aboutsummaryrefslogtreecommitdiff
path: root/lib/user.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/user.cpp')
-rw-r--r--lib/user.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/user.cpp b/lib/user.cpp
index 85f9d9a7..7143620f 100644
--- a/lib/user.cpp
+++ b/lib/user.cpp
@@ -176,6 +176,8 @@ void User::rename(const QString& newName, const Room* r)
const auto actualNewName = sanitized(newName);
MemberEventContent evtC;
evtC.displayName = actualNewName;
+ // #481: fill in the current avatar URL in order to not clear it out
+ evtC.avatarUrl = r->getCurrentState<RoomMemberEvent>(id())->avatarUrl();
r->setState<RoomMemberEvent>(id(), move(evtC));
// The state will be updated locally after it arrives with sync
}