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:
Doug
2024-06-19 11:27:10 +01:00
committed by GitHub
parent 17d96b0f4b
commit 834260c144
55 changed files with 524 additions and 198 deletions
@@ -84,6 +84,7 @@ extension Array where Element == RoomSummary {
name: "Foundation 🔭🪐🌌",
isDirect: false,
avatarURL: nil,
heroes: [],
lastMessage: AttributedString("I do not wish to take the trouble to understand mysticism"),
lastMessageFormattedTimestamp: "14:56",
unreadMessagesCount: 0,
@@ -100,6 +101,7 @@ extension Array where Element == RoomSummary {
name: "Foundation and Empire",
isDirect: false,
avatarURL: URL.picturesDirectory,
heroes: [],
lastMessage: AttributedString("How do you see the Emperor then? You think he keeps office hours?"),
lastMessageFormattedTimestamp: "2:56 PM",
unreadMessagesCount: 2,
@@ -116,6 +118,7 @@ extension Array where Element == RoomSummary {
name: "Second Foundation",
isDirect: false,
avatarURL: nil,
heroes: [],
lastMessage: try? AttributedString(markdown: "He certainly seemed no *mental genius* to me"),
lastMessageFormattedTimestamp: "Some time ago",
unreadMessagesCount: 3,
@@ -132,6 +135,7 @@ extension Array where Element == RoomSummary {
name: "Foundation's Edge",
isDirect: false,
avatarURL: nil,
heroes: [],
lastMessage: AttributedString("There's an archaic measure of time that's called the month"),
lastMessageFormattedTimestamp: "Just now",
unreadMessagesCount: 2,
@@ -148,6 +152,7 @@ extension Array where Element == RoomSummary {
name: "Foundation and Earth",
isDirect: true,
avatarURL: nil,
heroes: [],
lastMessage: AttributedString("Clearly, if Earth is powerful enough to do that, it might also be capable of adjusting minds in order to force belief in its radioactivity"),
lastMessageFormattedTimestamp: "1986",
unreadMessagesCount: 1,
@@ -164,6 +169,7 @@ extension Array where Element == RoomSummary {
name: "Prelude to Foundation",
isDirect: true,
avatarURL: nil,
heroes: [],
lastMessage: AttributedString("Are you groping for the word 'paranoia'?"),
lastMessageFormattedTimestamp: "きょうはじゅういちがつじゅういちにちです",
unreadMessagesCount: 6,
@@ -180,6 +186,7 @@ extension Array where Element == RoomSummary {
name: "Unknown",
isDirect: false,
avatarURL: nil,
heroes: [],
lastMessage: nil,
lastMessageFormattedTimestamp: nil,
unreadMessagesCount: 0,
@@ -229,6 +236,7 @@ extension Array where Element == RoomSummary {
name: "First room",
isDirect: false,
avatarURL: URL.picturesDirectory,
heroes: [],
lastMessage: nil,
lastMessageFormattedTimestamp: nil,
unreadMessagesCount: 0,
@@ -245,6 +253,7 @@ extension Array where Element == RoomSummary {
name: "Second room",
isDirect: true,
avatarURL: nil,
heroes: [],
lastMessage: nil,
lastMessageFormattedTimestamp: nil,
unreadMessagesCount: 0,