aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--user.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/user.cpp b/user.cpp
index 699989ac..45511f38 100644
--- a/user.cpp
+++ b/user.cpp
@@ -132,7 +132,10 @@ void User::processEvent(Event* event)
if( event->type() == EventType::RoomMember )
{
RoomMemberEvent* e = static_cast<RoomMemberEvent*>(event);
- if( d->name != e->displayName() && e->membership() != MembershipType::Leave)
+ if (e->membership() == MembershipType::Leave)
+ return;
+
+ if( d->name != e->displayName() )
{
const auto oldName = d->name;
d->name = e->displayName();