]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/replynoticestream.php
Replies and Conversation noticestreams should only get POSTs by default
[quix0rs-gnu-social.git] / lib / replynoticestream.php
index 2ab3fce261aeaa64f5acee518fd924d2f4b86067..43e378c1be2df09bcc0b03a7eb93ca425b5c8ebe 100644 (file)
@@ -75,6 +75,7 @@ class RawReplyNoticeStream extends NoticeStream
 
     function __construct($userId)
     {
+        parent::__construct();
         $this->userId = $userId;
     }
 
@@ -86,6 +87,11 @@ class RawReplyNoticeStream extends NoticeStream
         Notice::addWhereSinceId($reply, $since_id, 'notice_id', 'modified');
         Notice::addWhereMaxId($reply, $max_id, 'notice_id', 'modified');
 
+        if (!empty($this->selectVerbs)) {
+            $reply->joinAdd(array('notice_id', 'notice:id'));
+            $reply->whereAddIn('notice.verb', $this->selectVerbs, 'string');
+        }
+
         $reply->orderBy('modified DESC, notice_id DESC');
 
         if (!is_null($offset)) {