]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Replies and Conversation noticestreams should only get POSTs by default
authorMikael Nordfeldth <mmn@hethane.se>
Tue, 15 Jul 2014 12:27:03 +0000 (14:27 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Tue, 15 Jul 2014 12:27:03 +0000 (14:27 +0200)
lib/conversationnoticestream.php
lib/replynoticestream.php

index 27489a42dfe777be9017c4f53d142fdbbbfbb158..9c32159d42aabe90de6fa2284e3c0ac281671fca 100644 (file)
@@ -73,6 +73,7 @@ class RawConversationNoticeStream extends NoticeStream
 
     function __construct($id)
     {
+        parent::__construct();
         $this->id = $id;
     }
 
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)) {