1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <?php
- if (!defined('STATUSNET')) {
-
-
- 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);
- }
- function filter($notice)
- {
- if (!array_key_exists($notice->conversation, $this->seen)) {
- $this->seen[$notice->conversation] = true;
- return true;
- } else {
- return false;
- }
- }
- }
|