From 44a22c29155fa3beeed7cd5d0add30818e409891 Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 22 May 2011 18:40:00 -0700 Subject: more improvements in twitter handling, reduce duplicates from FB when double friended --- mod/follow.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'mod') diff --git a/mod/follow.php b/mod/follow.php index 6786e9039..9a9f9da7d 100644 --- a/mod/follow.php +++ b/mod/follow.php @@ -12,7 +12,7 @@ function follow_post(&$a) { $url = $orig_url = notags(trim($_POST['url'])); - // remove ajax junk + // remove ajax junk, e.g. Twitter $url = str_replace('/#!/','/',$url); @@ -41,6 +41,14 @@ function follow_post(&$a) { if(! ((x($ret,'name')) && (x($ret,'poll')) && ((x($ret,'url')) || (x($ret,'addr'))))) { notice( t('The profile address specified does not provide adequate information.') . EOL); + if(! x($ret,'poll')) + notice( t('No compatible communication protocols or feeds were discovered.') . EOL); + if(! x($ret,'name')) + notice( t('An author or name was not found.') . EOL); + if(! x($ret,'url')) + notice( t('No browser URL could be matched to this address.') . EOL); + if(strpos($url,'@') !== false) + notice('Unable to match @-style Identity Address with a known protocol or email contact'); goaway($_SESSION['return_url']); } -- cgit v1.2.3