add in_reply_to link and make HTML in source work correctly

This commit is contained in:
Evan Prodromou
2009-05-01 08:39:47 -07:00
parent 1a61a171cd
commit 5affe093ab
2 changed files with 24 additions and 4 deletions

View File

@@ -158,6 +158,15 @@ class CometPlugin extends Plugin
$arr = $act->twitter_status_array($notice, true);
$arr['url'] = $notice->bestUrl();
$arr['html'] = htmlspecialchars($notice->rendered);
$arr['source'] = htmlspecialchars($arr['source']);
if (!empty($notice->reply_to)) {
$reply_to = Notice::staticGet('id', $notice->reply_to);
if (!empty($reply_to)) {
$arr['in_reply_to_status_url'] = $reply_to->bestUrl();
}
$reply_to = null;
}
$profile = $notice->getProfile();
$arr['user']['profile_url'] = $profile->profileurl;