mirror of
https://github.com/matrix-construct/construct
synced 2025-01-01 02:14:13 +01:00
ircd:Ⓜ️:room::members: Replace assertion with error log.
This commit is contained in:
parent
2a736ac581
commit
e404c7a094
1 changed files with 13 additions and 5 deletions
|
@ -3135,7 +3135,7 @@ const
|
|||
// joined members optimization. Only possible when seeking
|
||||
// membership="join" on the present state of the room.
|
||||
if(membership == "join" && present)
|
||||
return this->for_each(membership, [&closure, &state, this]
|
||||
return this->for_each(membership, [this, &closure, &state]
|
||||
(const id::user &member)
|
||||
{
|
||||
const auto event_idx
|
||||
|
@ -3143,10 +3143,18 @@ const
|
|||
state.get(std::nothrow, "m.room.member", member)
|
||||
};
|
||||
|
||||
assert(event_idx);
|
||||
return event_idx?
|
||||
closure(member, event_idx):
|
||||
true;
|
||||
if(likely(event_idx))
|
||||
return closure(member, event_idx);
|
||||
|
||||
log::error
|
||||
{
|
||||
log, "Failed to find member event_idx:%zu for %s in present state of %s",
|
||||
event_idx,
|
||||
string_view{member},
|
||||
string_view{room.room_id},
|
||||
};
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
return state.for_each("m.room.member", [this, &membership, &closure]
|
||||
|
|
Loading…
Reference in a new issue