mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Use the room heroes when computing a DM avatar. (#2900)
* Use room heroes for DM avatar content ID. * Use RoomAvatar.heroes for the DM Details stack.
This commit is contained in:
@@ -86,12 +86,14 @@ class LoggingTests: XCTestCase {
|
||||
// Given a room summary that contains sensitive information
|
||||
let roomName = "Private Conversation"
|
||||
let lastMessage = "Secret information"
|
||||
let heroName = "Pseudonym"
|
||||
let roomSummary = RoomSummaryDetails(id: "myroomid",
|
||||
isInvite: false,
|
||||
inviter: nil,
|
||||
name: roomName,
|
||||
isDirect: true,
|
||||
avatarURL: nil,
|
||||
heroes: [.init(userID: "", displayName: heroName)],
|
||||
lastMessage: AttributedString(lastMessage),
|
||||
lastMessageFormattedTimestamp: "Now",
|
||||
unreadMessagesCount: 0,
|
||||
@@ -116,6 +118,7 @@ class LoggingTests: XCTestCase {
|
||||
XCTAssertTrue(content.contains(roomSummary.id))
|
||||
XCTAssertFalse(content.contains(roomName))
|
||||
XCTAssertFalse(content.contains(lastMessage))
|
||||
XCTAssertFalse(content.contains(heroName))
|
||||
}
|
||||
|
||||
func validateTimelineContentIsRedacted() throws {
|
||||
|
||||
Reference in New Issue
Block a user