Story improvements

This commit is contained in:
Ali
2023-06-09 20:17:50 +04:00
parent f8ecc999e6
commit 434e9dd22d
31 changed files with 443 additions and 61 deletions

View File

@@ -2574,18 +2574,26 @@ final class MessageHistoryTable: Table {
}
}
var associatedStories: [StoryId: CodableEntry] = [:]
for media in parsedMedia {
for peerId in media.peerIds {
if let peer = peerTable.get(peerId) {
peers[peer.id] = peer
}
}
for storyId in media.storyIds {
if associatedStories[storyId] == nil {
if let story = storyTable.get(id: storyId) {
associatedStories[storyId] = story
}
}
}
}
var associatedMessageIds: [MessageId] = []
var associatedMessages = SimpleDictionary<MessageId, Message>()
var associatedMedia: [MediaId: Media] = [:]
var associatedStories: [StoryId: CodableEntry] = [:]
for attribute in parsedAttributes {
for peerId in attribute.associatedPeerIds {