mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Fix display name referenced for incorrect event types
This commit is contained in:
parent
01ee25cee4
commit
a402e85a0f
1 changed files with 4 additions and 3 deletions
|
@ -1463,9 +1463,8 @@ TimelineModel::formatMemberEvent(QString id)
|
|||
}
|
||||
}
|
||||
|
||||
QString user = QString::fromStdString(event->state_key);
|
||||
QString name = utils::replaceEmoji(displayName(user));
|
||||
QString oldName = QString::fromStdString(prevEvent->content.display_name);
|
||||
QString user = QString::fromStdString(event->state_key);
|
||||
QString name = utils::replaceEmoji(displayName(user));
|
||||
QString rendered;
|
||||
|
||||
// see table https://matrix.org/docs/spec/client_server/latest#m-room-member
|
||||
|
@ -1476,6 +1475,8 @@ TimelineModel::formatMemberEvent(QString id)
|
|||
break;
|
||||
case Membership::Join:
|
||||
if (prevEvent && prevEvent->content.membership == Membership::Join) {
|
||||
QString oldName = QString::fromStdString(prevEvent->content.display_name);
|
||||
|
||||
bool displayNameChanged =
|
||||
prevEvent->content.display_name != event->content.display_name;
|
||||
bool avatarChanged =
|
||||
|
|
Loading…
Reference in a new issue