From 0cefab3603321b304914c7ee840e64a478ce050c Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Tue, 15 Jul 2014 14:27:03 +0200 Subject: [PATCH] Replies and Conversation noticestreams should only get POSTs by default --- lib/conversationnoticestream.php | 1 + lib/replynoticestream.php | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/lib/conversationnoticestream.php b/lib/conversationnoticestream.php index 27489a42df..9c32159d42 100644 --- a/lib/conversationnoticestream.php +++ b/lib/conversationnoticestream.php @@ -73,6 +73,7 @@ class RawConversationNoticeStream extends NoticeStream function __construct($id) { + parent::__construct(); $this->id = $id; } diff --git a/lib/replynoticestream.php b/lib/replynoticestream.php index 2ab3fce261..43e378c1be 100644 --- a/lib/replynoticestream.php +++ b/lib/replynoticestream.php @@ -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)) { -- 2.39.5