0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2025-02-18 01:30:12 +01:00

modules/client/sync/rooms/state: Fix condition for using state[] rather than timeline[].

This commit is contained in:
Jason Volk 2019-02-28 12:43:59 -08:00
parent b8fa7455e9
commit 4e6ed85d27
2 changed files with 5 additions and 3 deletions

View file

@ -62,6 +62,11 @@ ircd::m::sync::_default_fopts
bool
ircd::m::sync::room_state_linear(data &data)
{
// if since token is non-zero, any events in the range are
// included in the timeline array and not the state array.
if(data.range.first)
return false;
if(!data.event_idx)
return false;

View file

@ -54,9 +54,6 @@ ircd::m::sync::room_timeline_linear(data &data)
return false;
assert(data.event);
if(!json::get<"event_id"_>(*data.event))
return false;
json::stack::array array
{
*data.out, "events"