Add source link attr to statusnet:notice_info element in Atom output for notices

This commit is contained in:
Zach Copley 2010-05-06 00:44:56 -07:00
parent c78f67aa73
commit 68634f0496
1 changed files with 8 additions and 2 deletions

View File

@ -1215,8 +1215,14 @@ class Notice extends Memcached_DataObject
$noticeInfoAttr = array(
'local_id' => $this->id, // local notice ID (useful to clients for ordering)
'source' => $this->source // the client name (source attribution)
// @todo source source_link
);
);
$ns = $this->getSource();
if ($ns) {
if (!empty($ns->url)) {
$noticeInfoAttr['source_link'] = htmlentities($ns->url);
}
}
if (!empty($cur)) {
$noticeInfoAttr['favorited'] = ($cur->hasFave($this)) ? 'true' : 'false';