From 6f18091a48530399908fbc6ebcb0697bae970abb Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sat, 17 Nov 2018 20:40:17 +0900 Subject: Room::processStateEvent: process banning correctly Closes #258. --- lib/room.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3