* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/
*/
-
class ConversationNoticeStream extends ScopingNoticeStream
{
- function __construct($id)
+ function __construct($id, $profile = -1)
{
+ if (is_int($profile) && $profile == -1) {
+ $profile = Profile::current();
+ }
+
parent::__construct(new CachingNoticeStream(new RawConversationNoticeStream($id),
- 'notice:conversation_ids:'.$id));
+ 'notice:conversation_ids:'.$id),
+ $profile);
}
}
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html AGPL 3.0
* @link http://status.net/
*/
-
class RawConversationNoticeStream extends NoticeStream
{
protected $id;
Notice::addWhereSinceId($notice, $since_id);
Notice::addWhereMaxId($notice, $max_id);
- $ids = array();
-
- if ($notice->find()) {
- while ($notice->fetch()) {
- $ids[] = $notice->id;
- }
- }
-
- $notice->free();
- $notice = NULL;
-
- return $ids;
+ return $notice->fetchAll('id');
}
}
\ No newline at end of file