aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-04-17 21:46:07 +0900
committerGitHub <noreply@github.com>2017-04-17 21:46:07 +0900
commit859355cf660080ba826bb759fd44c3360ea825f6 (patch)
tree30d98a416e069656ffe00edb9b1ee3cb0c12c005
parent1f38a992a53b71c62077803767473d1bc8a74c58 (diff)
parent836f35dc7d84dbd085aeae72c14120dd3994244c (diff)
downloadlibquotient-859355cf660080ba826bb759fd44c3360ea825f6.tar.gz
libquotient-859355cf660080ba826bb759fd44c3360ea825f6.zip
Merge pull request #59 from elvisangelaccio/fix-displayname
Don't discard user display names upon leave membership events
-rw-r--r--user.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/user.cpp b/user.cpp
index 8f0968bb..699989ac 100644
--- a/user.cpp
+++ b/user.cpp
@@ -132,7 +132,7 @@ void User::processEvent(Event* event)
if( event->type() == EventType::RoomMember )
{
RoomMemberEvent* e = static_cast<RoomMemberEvent*>(event);
- if( d->name != e->displayName() )
+ if( d->name != e->displayName() && e->membership() != MembershipType::Leave)
{
const auto oldName = d->name;
d->name = e->displayName();