aboutsummaryrefslogtreecommitdiff
path: root/lib/room.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-11-17 20:40:17 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-11-17 20:40:17 +0900
commit6f18091a48530399908fbc6ebcb0697bae970abb (patch)
treebc08bac15998e2f1f8790c68c30a3989b30ead9e /lib/room.cpp
parent760c42bbb6027bfc6ebeb70a3a77608378d7c510 (diff)
downloadlibquotient-6f18091a48530399908fbc6ebcb0697bae970abb.tar.gz
libquotient-6f18091a48530399908fbc6ebcb0697bae970abb.zip
Room::processStateEvent: process banning correctly
Closes #258.
Diffstat (limited to 'lib/room.cpp')
-rw-r--r--lib/room.cpp4
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);