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

modules/federation/get_missing_events: Fix unwrapped prev_events iteration.

This commit is contained in:
Jason Volk 2019-07-11 16:24:43 -07:00
parent f6f71fbbce
commit 3b088e8bc1

View file

@ -166,8 +166,9 @@ get__missing_events(client &client,
continue;
events.append(event);
for(const json::array &prev : json::get<"prev_events"_>(event))
if(!add_queue(unquote(prev.at(0))))
const m::event::prev prev(event);
for(size_t i(0); i < prev.prev_events_count(); ++i)
if(!add_queue(prev.prev_event(i)))
break;
}