From f70a0b028288fa13c64f1ffaa310765a95347dac Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 8 Feb 2011 18:44:30 -0800 Subject: more graceful handling of some statusnet followups --- mod/item.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'mod/item.php') diff --git a/mod/item.php b/mod/item.php index 2264ea5b9..737fe8341 100644 --- a/mod/item.php +++ b/mod/item.php @@ -246,18 +246,20 @@ function item_post(&$a) { ); } if(count($r)) { - if($r[0]['network'] === 'stat') - $stat = true; $profile = $r[0]['url']; - $newname = $r[0]['name']; + if($r[0]['network'] === 'stat') { + $newname = $r[0]['nick']; + $stat = true; + } + else + $newname = $r[0]['name']; if(strlen($inform)) $inform .= ','; $inform .= 'cid:' . $r[0]['id']; } } if($profile) { - if(! $stat) - $body = str_replace('@' . $name, '@' . '[url=' . $profile . ']' . $newname . '[/url]', $body); + $body = str_replace('@' . $name, '@' . '[url=' . $profile . ']' . $newname . '[/url]', $body); $profile = str_replace(',','%2c',$profile); if(strlen($str_tags)) $str_tags .= ','; -- cgit v1.2.3