mirror of
https://github.com/matrix-construct/construct
synced 2024-11-10 12:01:15 +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
|
// joined members optimization. Only possible when seeking
|
||||||
// membership="join" on the present state of the room.
|
// membership="join" on the present state of the room.
|
||||||
if(membership == "join" && present)
|
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 id::user &member)
|
||||||
{
|
{
|
||||||
const auto event_idx
|
const auto event_idx
|
||||||
|
@ -3143,10 +3143,18 @@ const
|
||||||
state.get(std::nothrow, "m.room.member", member)
|
state.get(std::nothrow, "m.room.member", member)
|
||||||
};
|
};
|
||||||
|
|
||||||
assert(event_idx);
|
if(likely(event_idx))
|
||||||
return event_idx?
|
return closure(member, event_idx);
|
||||||
closure(member, event_idx):
|
|
||||||
true;
|
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]
|
return state.for_each("m.room.member", [this, &membership, &closure]
|
||||||
|
|
Loading…
Reference in a new issue