OStatus: override source link with the source domain and link to original message

This commit is contained in:
Brion Vibber
2010-02-17 02:16:03 +00:00
parent 19b03ef797
commit e51e96d724
2 changed files with 29 additions and 12 deletions

View File

@@ -289,4 +289,17 @@ class OStatusPlugin extends Plugin
$action->script(common_path('plugins/OStatus/js/ostatus.js'));
return true;
}
function onStartNoticeSourceLink($notice, &$name, &$url, &$title)
{
if ($notice->source == 'ostatus') {
$bits = parse_url($notice->uri);
$domain = $bits['host'];
$name = $domain;
$url = $notice->uri;
$title = sprintf(_m("Sent from %s via OStatus"), $domain);
return false;
}
}
}