Fixes #2706 - Use disambiguated display names for timeline item senders and state event bodies. (#2739)

This commit is contained in:
Stefan Ceriu
2024-04-25 14:53:18 +03:00
committed by GitHub
parent 6661c16154
commit 8d66572cc9
7 changed files with 84 additions and 50 deletions
@@ -100,13 +100,15 @@ class EventTimelineItemProxy {
let profile = item.senderProfile()
switch profile {
case let .ready(displayName, _, avatarUrl):
case let .ready(displayName, isDisplayNameAmbiguous, avatarUrl):
return .init(id: item.sender(),
displayName: displayName,
isDisplayNameAmbiguous: isDisplayNameAmbiguous,
avatarURL: avatarUrl.flatMap(URL.init(string:)))
default:
return .init(id: item.sender(),
displayName: nil,
isDisplayNameAmbiguous: false,
avatarURL: nil)
}
}()