12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?php
- if (!defined('GNUSOCIAL')) { exit(1); }
- class ThreadingNoticeStream extends FilteringNoticeStream
- {
- protected $seen = array();
- function getNotices($offset, $limit, $sinceId=null, $maxId=null)
- {
-
- $this->seen = array();
- return parent::getNotices($offset, $limit, $sinceId, $maxId);
- }
- protected function filter(Notice $notice)
- {
- if (!array_key_exists($notice->conversation, $this->seen)) {
- $this->seen[$notice->conversation] = true;
- return true;
- } else {
- return false;
- }
- }
- }
|