[WIP] Saved messages

This commit is contained in:
Isaac
2023-12-23 00:47:22 +04:00
parent 624155ae99
commit 0ad61d8d63
71 changed files with 2079 additions and 1024 deletions

View File

@@ -138,12 +138,3 @@ public class ReplyStoryAttribute: MessageAttribute {
encoder.encode(self.storyId, forKey: "i")
}
}
public extension Message {
var effectiveReplyThreadMessageId: MessageId? {
if let threadId = self.threadId {
return makeThreadIdMessageId(peerId: self.id.peerId, threadId: threadId)
}
return nil
}
}

View File

@@ -190,6 +190,13 @@ public let telegramPostboxSeedConfiguration: SeedConfiguration = {
}
}
return false
},
automaticThreadIndexInfo: { peerId, _ in
if peerId.namespace == Namespaces.Peer.CloudUser {
return StoredMessageHistoryThreadInfo(data: CodableEntry(data: Data()), summary: StoredMessageHistoryThreadInfo.Summary(totalUnreadCount: 0, mutedUntil: nil))
} else {
return nil
}
}
)
}()