forked from GNUsocial/gnu-social
do since_id and max_id in inbox
This commit is contained in:
parent
abd67452da
commit
16742d0fde
@ -153,8 +153,19 @@ class Inbox extends Memcached_DataObject
|
||||
|
||||
$ids = unpack('N*', $inbox->notice_ids);
|
||||
|
||||
// XXX: handle since_id
|
||||
// XXX: handle max_id
|
||||
if (!empty($since_id)) {
|
||||
$i = array_search($since_id, $ids);
|
||||
if ($i !== false) {
|
||||
$ids = array_slice($ids, 0, $i - 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($max_id)) {
|
||||
$i = array_search($max_id, $ids);
|
||||
if ($i !== false) {
|
||||
$ids = array_slice($ids, $i - 1);
|
||||
}
|
||||
}
|
||||
|
||||
$ids = array_slice($ids, $offset, $limit);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user