]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Need to always emit statusnet:notice_info so it's available in profile feeds
authorZach Copley <zach@status.net>
Wed, 12 May 2010 22:08:01 +0000 (15:08 -0700)
committerZach Copley <zach@status.net>
Tue, 18 May 2010 22:17:05 +0000 (15:17 -0700)
classes/Notice.php

index 0dc7e10e79e6ee131107f75c9f54d7b907766743..e173a2469095d7fd4410ecaee7333fe78322b904 100644 (file)
@@ -1211,24 +1211,6 @@ class Notice extends Memcached_DataObject
 
             $xs->element('icon', null, $profile->avatarUrl(AVATAR_PROFILE_SIZE));
             $xs->element('updated', null, common_date_w3dtf($this->created));
-
-            $noticeInfoAttr = array(
-                'local_id'   => $this->id,    // local notice ID (useful to clients for ordering)
-                'source'     => $this->source // the client name (source attribution)
-            );
-
-            $ns = $this->getSource();
-            if ($ns) {
-                if (!empty($ns->url)) {
-                    $noticeInfoAttr['source_link'] = $ns->url;
-                }
-            }
-
-            if (!empty($cur)) {
-                $noticeInfoAttr['favorited'] = ($cur->hasFave($this)) ? 'true' : 'false';
-            }
-
-            $xs->element('statusnet:notice_info', $noticeInfoAttr, null);
         }
 
         if ($source) {
@@ -1251,6 +1233,24 @@ class Notice extends Memcached_DataObject
         $xs->element('published', null, common_date_w3dtf($this->created));
         $xs->element('updated', null, common_date_w3dtf($this->created));
 
+        $noticeInfoAttr = array(
+            'local_id'   => $this->id,    // local notice ID (useful to clients for ordering)
+            'source'     => $this->source // the client name (source attribution)
+        );
+
+        $ns = $this->getSource();
+        if ($ns) {
+            if (!empty($ns->url)) {
+                $noticeInfoAttr['source_link'] = $ns->url;
+            }
+        }
+
+        if (!empty($cur)) {
+            $noticeInfoAttr['favorited'] = ($cur->hasFave($this)) ? 'true' : 'false';
+        }
+
+        $xs->element('statusnet:notice_info', $noticeInfoAttr, null);
+
         if ($this->reply_to) {
             $reply_notice = Notice::staticGet('id', $this->reply_to);
             if (!empty($reply_notice)) {