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
|
out
|
||||||
};
|
};
|
||||||
|
|
||||||
// Spec sez the 'from' token is exclusive
|
|
||||||
if(page.from && it)
|
|
||||||
{
|
|
||||||
if(page.dir == 'b')
|
|
||||||
--it;
|
|
||||||
else
|
|
||||||
++it;
|
|
||||||
}
|
|
||||||
|
|
||||||
m::event::id::buf start
|
m::event::id::buf start
|
||||||
{
|
{
|
||||||
page.dir == 'b'? page.from : m::event::id::buf{}
|
page.dir == 'b'? page.from : m::event::id::buf{}
|
||||||
|
@ -148,7 +139,7 @@ get__messages(client &client,
|
||||||
else
|
else
|
||||||
end = at<"event_id"_>(event);
|
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;
|
break;
|
||||||
|
|
||||||
if(!visible(event, request.user_id))
|
if(!visible(event, request.user_id))
|
||||||
|
|
Loading…
Reference in a new issue