aboutsummaryrefslogtreecommitdiff
path: root/user.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-04-20 02:56:18 +0900
committerGitHub <noreply@github.com>2017-04-20 02:56:18 +0900
commit9a13bbfd8a800712d0a2fcc4887c8d4115d06d4e (patch)
tree5cdecf0bf5d1be385049e55f1a12d9f8f3070ada /user.cpp
parent3301173ed41b925e0dda09c9ba19bd3d4e027962 (diff)
parentd3a6b34ba7fbe4175a8aaec030cd12f69ba38dfe (diff)
downloadlibquotient-9a13bbfd8a800712d0a2fcc4887c8d4115d06d4e.tar.gz
libquotient-9a13bbfd8a800712d0a2fcc4887c8d4115d06d4e.zip
Merge pull request #60 from elvisangelaccio/dont-discard-avatars
Don't discard avatars as well
Diffstat (limited to 'user.cpp')
-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();