mirror of
https://github.com/matrix-construct/construct
synced 2024-11-26 08:42:34 +01:00
modules/client/rooms/messages: Consider the from token inclusive.
This commit is contained in:
parent
811e4f8c03
commit
d8da7814e8
1 changed files with 1 additions and 10 deletions
|
@ -115,15 +115,6 @@ get__messages(client &client,
|
|||
out
|
||||
};
|
||||
|
||||
// Spec sez the 'from' token is exclusive
|
||||
if(page.from && it)
|
||||
{
|
||||
if(page.dir == 'b')
|
||||
--it;
|
||||
else
|
||||
++it;
|
||||
}
|
||||
|
||||
m::event::id::buf start
|
||||
{
|
||||
page.dir == 'b'? page.from : m::event::id::buf{}
|
||||
|
@ -148,7 +139,7 @@ get__messages(client &client,
|
|||
else
|
||||
end = at<"event_id"_>(event);
|
||||
|
||||
if(hit >= page.limit || miss >= size_t(max_filter_miss))
|
||||
if(hit > page.limit || miss >= size_t(max_filter_miss))
|
||||
break;
|
||||
|
||||
if(!visible(event, request.user_id))
|
||||
|
|
Loading…
Reference in a new issue