function formatNotice($notice)
{
$profile = $notice->getProfile();
- return $profile->nickname . ': ' . $notice->content . ' [' . $notice->id . ']';
+ $nicknames = $profile->nickname;
+ if (!empty($notice->reply_to)) {
+ $orig_notice = $notice->getParent();
+ $orig_profile = $orig_notice->getProfile();
+ $nicknames = $nicknames . " => " . $orig_profile->nickname;
+ }
+ common_log(LOG_INFO, "Notice: " . $notice->content, __FILE__);
+ $data = $nicknames . ': ' . $notice->content . ' [' . $notice->id . ']';
+ return $data;
+
}
//========================UTILITY FUNCTIONS USEFUL TO IMPLEMENTATIONS - RECEIVING ========================\
$xs->elementStart('body', array('xmlns' => 'http://www.w3.org/1999/xhtml'));
$xs->element('a', array('href' => $profile->profileurl),
$profile->nickname);
- $xs->text(": ");
+ if (!empty($notice->reply_to)) {
+ $orig_notice = Notice::getKV('id', $notice->reply_to);
+ $orig_profile = $orig_notice->getProfile();
+ $xs->text(" => ");
+ $xs->element('a', array('href' => $orig_profile->profileurl),
+ $orig_profile->nickname);
+ $xs->text(": ");
+ } else {
+ $xs->text(": ");
+ }
if (!empty($notice->rendered)) {
+ $notice->rendered = str_replace("\t", "", $notice->rendered);
$xs->raw($notice->rendered);
} else {
$xs->raw(common_render_content($notice->content, $notice));