diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-12-28 15:53:31 +0100 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-12-28 15:53:31 +0100 |
commit | dcef98f962c29b004d5d9fff1cff0102c6c9768f (patch) | |
tree | 9212eafbcf23b0fa7e27b10538cd6182fe6a45cc /lib/csapi/receipts.cpp | |
parent | 1b2b2ee36695d378a54753b7059acb4c063d7061 (diff) | |
download | libquotient-dcef98f962c29b004d5d9fff1cff0102c6c9768f.tar.gz libquotient-dcef98f962c29b004d5d9fff1cff0102c6c9768f.zip |
Room: really fix namesakes assertion failure
This removes now-deprecated RoomMemberEvent API usages and also does
a few more things differently from the stable branch. Rather than rely
on prev_content (the way pre-0.7 goes), processStateEvent() now
includes a pre-check for no-op state events (the fix in ff020f3b
turned out to be insufficient for such events and they still caused
the same assertion failure at some point down the line). Now the state
event is only added to currentState and, where relevant, to baseState,
if it actually changes the room state; otherwise, it is ignored for
the purpose of state tracking (even when still added to the timeline,
if it came in the timeline block).
One side-effect of this change is that processStateEvent() now returns
OtherChange instead of NoChange for unknown state events.
At the same time removeMemberFromMap() now has an additional safety net,
making sure that a given user is actually deleted from the map even
if their name is mismatched. This comes at a cost of looking through
the whole hashmap but normally should not occur with the current code
that shaves away no-op state events. We'll only see when some client
starts to actively use 0.7 (quotest doesn't trigger those).
Diffstat (limited to 'lib/csapi/receipts.cpp')
0 files changed, 0 insertions, 0 deletions