0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2025-01-09 14:25:56 +01:00

modules/federation/send_join: Tolerate join event prev_state not found w/o throwing.

This commit is contained in:
Jason Volk 2023-02-24 00:35:49 -08:00
parent 99f6289922
commit 4519ecf6e3

View file

@ -230,14 +230,19 @@ send_join__response(client &client,
request.query.get("omit_members", false) request.query.get("omit_members", false)
}; };
const auto state_idx
{
m::index(std::nothrow, event.event_id)
};
const auto prev_state_idx const auto prev_state_idx
{ {
m::room::state::prev(m::index(event.event_id)) m::room::state::prev(state_idx)
}; };
const auto prev_state_id const auto prev_state_id
{ {
m::event_id(prev_state_idx) m::event_id(std::nothrow, prev_state_idx)
}; };
// The room prior to this join. // The room prior to this join.