0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-27 07:54:05 +01:00

modules/client/rooms/messages: Consider the from token inclusive.

This commit is contained in:
Jason Volk 2019-03-09 18:19:05 -08:00
parent 811e4f8c03
commit d8da7814e8

View file

@ -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))