]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/threadingnoticestream.php
Merge branch 'nightly' into 'nightly'
[quix0rs-gnu-social.git] / lib / threadingnoticestream.php
index c4b35f4092557f361e11e7eea88cb82241af263c..de113b2a41a096adf972fa7cb73b5abb58fb4877 100644 (file)
  * @link      http://status.net/
  */
 
-if (!defined('STATUSNET')) {
-    // This check helps protect against security problems;
-    // your code file can't be executed directly from the web.
-    exit(1);
-}
+if (!defined('GNUSOCIAL')) { exit(1); }
 
 /**
  * This notice stream filters notices by whether their conversation
@@ -58,10 +54,10 @@ class ThreadingNoticeStream extends FilteringNoticeStream
         return parent::getNotices($offset, $limit, $sinceId, $maxId);
     }
 
-    function filter($notice)
+    protected function filter(Notice $notice)
     {
-        if (!array_key_exists($notice->id, $this->seen)) {
-            $this->seen[$notice->id] = true;
+        if (!array_key_exists($notice->conversation, $this->seen)) {
+            $this->seen[$notice->conversation] = true;
             return true;
         } else {
             return false;