aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElvis Angelaccio <elvis.angelaccio@kde.org>2017-04-19 12:55:19 +0200
committerElvis Angelaccio <elvis.angelaccio@kde.org>2017-04-19 12:55:19 +0200
commitd3a6b34ba7fbe4175a8aaec030cd12f69ba38dfe (patch)
treeaa0bb2bc88f7201f351b41eb147e9c4ee4defcee
parenta54109c57bdbdd7ad51c69a847c0ed3428df717b (diff)
downloadlibquotient-d3a6b34ba7fbe4175a8aaec030cd12f69ba38dfe.tar.gz
libquotient-d3a6b34ba7fbe4175a8aaec030cd12f69ba38dfe.zip
Don't discard avatars as well
Same workaround as in commit 836f35dc7d, but this time also for avatars.
-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();