0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-10-03 22:28:52 +02:00

modules/client/rooms/context: Omit pagination tokens for ends of iteration.

This commit is contained in:
Jason Volk 2019-03-09 18:14:59 -08:00
parent 79782958fc
commit 811e4f8c03

View file

@ -132,11 +132,13 @@ get__context(client &client,
array.append(event);
}
if(before)
if(before && limit > 0)
--before;
if(before)
start = before.event_id();
else
start = {};
}
json::stack::member
@ -166,11 +168,13 @@ get__context(client &client,
array.append(event);
}
if(after)
if(after && limit > 0)
++after;
if(after)
end = after.event_id();
else
end = {};
}
json::stack::member