]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Realtime/RealtimePlugin.php
Merge remote-tracking branch 'upstream/master'
[quix0rs-gnu-social.git] / plugins / Realtime / RealtimePlugin.php
index 2ef20277e7798cf209a3f1d5f6110eaf32928627..87da4ba6314eb32fea4b3acbd91d1847f9b339bb 100644 (file)
@@ -173,8 +173,9 @@ class RealtimePlugin extends Plugin
 
         // Add to the public timeline
 
-        if ($notice->is_local == Notice::LOCAL_PUBLIC ||
-            ($notice->is_local == Notice::REMOTE && !common_config('public', 'localonly'))) {
+        $is_local = intval($notice->is_local);
+        if ($is_local === Notice::LOCAL_PUBLIC ||
+                ($is_local === Notice::REMOTE && !common_config('public', 'localonly'))) {
             $paths[] = array('public', null, null);
         }
 
@@ -321,7 +322,7 @@ class RealtimePlugin extends Plugin
 
         $arr = $act->twitterStatusArray($notice, true);
         $arr['url'] = $notice->getUrl(true);
-        $arr['html'] = htmlspecialchars($notice->rendered);
+        $arr['html'] = htmlspecialchars($notice->getRendered());
         $arr['source'] = htmlspecialchars($arr['source']);
         $arr['conversation_url'] = $notice->getConversationUrl();
 
@@ -334,7 +335,7 @@ class RealtimePlugin extends Plugin
             $original = Notice::getKV('id', $notice->repeat_of);
             if ($original instanceof Notice) {
                 $arr['retweeted_status']['url'] = $original->getUrl(true);
-                $arr['retweeted_status']['html'] = htmlspecialchars($original->rendered);
+                $arr['retweeted_status']['html'] = htmlspecialchars($original->getRendered());
                 $arr['retweeted_status']['source'] = htmlspecialchars($original->source);
                 $originalProfile = $original->getProfile();
                 $arr['retweeted_status']['user']['profile_url'] = $originalProfile->profileurl;