diff options
author | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-11-11 08:27:42 +0100 |
---|---|---|
committer | Alexey Rusakov <Kitsune-Ral@users.sf.net> | 2021-11-11 08:27:42 +0100 |
commit | 766410a6c9e928915ece112f4f4f4a4317789e5f (patch) | |
tree | 95cb911222a51718fd27c788c0a83805c75aa33f /lib/events/roommemberevent.cpp | |
parent | 5c0346f3a700e6af31463490b7af3382b86e09d5 (diff) | |
parent | 65bb0b5fcf029df7a9bfa0b7b7b7e3203fd7862f (diff) | |
download | libquotient-766410a6c9e928915ece112f4f4f4a4317789e5f.tar.gz libquotient-766410a6c9e928915ece112f4f4f4a4317789e5f.zip |
Merge branch 'dev' into kitsune-fix-read-receipts-and-markers
Diffstat (limited to 'lib/events/roommemberevent.cpp')
-rw-r--r-- | lib/events/roommemberevent.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/events/roommemberevent.cpp b/lib/events/roommemberevent.cpp index 8a6bddd8..469dbb32 100644 --- a/lib/events/roommemberevent.cpp +++ b/lib/events/roommemberevent.cpp @@ -103,16 +103,14 @@ bool RoomMemberEvent::isUnban() const bool RoomMemberEvent::isRename() const { - auto prevName = prevContent() && prevContent()->displayName - ? *prevContent()->displayName - : QString(); - return newDisplayName() != prevName; + return prevContent() && prevContent()->displayName + ? newDisplayName() != *prevContent()->displayName + : newDisplayName().has_value(); } bool RoomMemberEvent::isAvatarUpdate() const { - auto prevAvatarUrl = prevContent() && prevContent()->avatarUrl - ? *prevContent()->avatarUrl - : QUrl(); - return newAvatarUrl() != prevAvatarUrl; + return prevContent() && prevContent()->avatarUrl + ? newAvatarUrl() != *prevContent()->avatarUrl + : newAvatarUrl().has_value(); } |