Merge pull request #1708 from famedly/pat/archive-room-names
fix: Use name of other participant on archived rooms
This commit is contained in:
commit
3000b5b7f1
|
|
@ -299,13 +299,10 @@ class Room {
|
||||||
if (sender != null) return sender;
|
if (sender != null) return sender;
|
||||||
}
|
}
|
||||||
if (membership == Membership.leave) {
|
if (membership == Membership.leave) {
|
||||||
final invitation = getState(EventTypes.RoomMember, client.userID!);
|
if (directChatMatrixID != null) {
|
||||||
if (invitation != null &&
|
return i18n.wasDirectChatDisplayName(
|
||||||
invitation.unsigned?.tryGet<String>('prev_sender') != null) {
|
unsafeGetUserFromMemoryOrFallback(directChatMatrixID)
|
||||||
final name = unsafeGetUserFromMemoryOrFallback(
|
.calcDisplayname(i18n: i18n));
|
||||||
invitation.unsigned!.tryGet<String>('prev_sender')!)
|
|
||||||
.calcDisplayname(i18n: i18n);
|
|
||||||
return i18n.wasDirectChatDisplayName(name);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return i18n.emptyChat;
|
return i18n.emptyChat;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue