diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-11-17 20:40:17 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-11-17 20:40:17 +0900 |
commit | 6f18091a48530399908fbc6ebcb0697bae970abb (patch) | |
tree | bc08bac15998e2f1f8790c68c30a3989b30ead9e /lib/room.cpp | |
parent | 760c42bbb6027bfc6ebeb70a3a77608378d7c510 (diff) | |
download | libquotient-6f18091a48530399908fbc6ebcb0697bae970abb.tar.gz libquotient-6f18091a48530399908fbc6ebcb0697bae970abb.zip |
Room::processStateEvent: process banning correctly
Closes #258.
Diffstat (limited to 'lib/room.cpp')
-rw-r--r-- | lib/room.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/room.cpp b/lib/room.cpp index 38a4157e..3718a54b 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -1860,10 +1860,12 @@ bool Room::processStateEvent(const RoomEvent& e) emit userAdded(u); } } - else if( evt.membership() == MembershipType::Leave ) + else if( evt.membership() != MembershipType::Join ) { if (memberJoinState(u) == JoinState::Join) { + if (evt.membership() == MembershipType::Invite) + qCWarning(MAIN) << "Invalid membership change:" << evt; if (!d->membersLeft.contains(u)) d->membersLeft.append(u); d->removeMemberFromMap(u->name(this), u); |