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

modules/client/sync/rooms/state: Fix missing branch to switch to polylog on join.

This commit is contained in:
Jason Volk 2020-04-24 18:21:50 -07:00
parent 94ff1fbafe
commit dd603f3d07

View file

@ -128,6 +128,16 @@ ircd::m::sync::room_state_linear_events(data &data)
return false; return false;
} }
if(is_own_membership && data.membership == "join")
{
const scope_restore data_range_first
{
data.range.first, 0UL
};
return room_state_polylog_events(data);
}
json::stack::object rooms json::stack::object rooms
{ {
*data.out, "rooms" *data.out, "rooms"
@ -177,7 +187,7 @@ ircd::m::sync::room_state_linear_events(data &data)
} }
}; };
if(is_own_membership && (data.membership == "invite" || data.membership == "join")) if(is_own_membership && data.membership == "invite")
{ {
const m::room::state state{*data.room}; const m::room::state state{*data.room};
state.get(std::nothrow, "m.room.create", "", append); state.get(std::nothrow, "m.room.create", "", append);