1
0
Fork 0

more graceful handling of some statusnet followups

This commit is contained in:
Friendika 2011-02-08 18:44:30 -08:00
commit f70a0b0282
7 changed files with 65 additions and 15 deletions

View file

@ -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 .= ',';