[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

@@ -1088,7 +1088,7 @@ public final class AccountStateManager {
for attr in first.attributes {
if let attribute = attr as? ReplyMessageAttribute {
if let threadId = attribute.threadMessageId {
threadData = transaction.getMessageHistoryThreadInfo(peerId: first.id.peerId, threadId: makeMessageThreadId(threadId))?.data.get(MessageHistoryThreadData.self)
threadData = transaction.getMessageHistoryThreadInfo(peerId: first.id.peerId, threadId: Int64(threadId.id))?.data.get(MessageHistoryThreadData.self)
}
}
}
@@ -1999,7 +1999,7 @@ public func messagesForNotification(transaction: Transaction, id: MessageId, alw
}
if let attribute = attribute as? ReplyMessageAttribute {
if let threadId = attribute.threadMessageId {
threadData = transaction.getMessageHistoryThreadInfo(peerId: message.id.peerId, threadId: makeMessageThreadId(threadId))?.data.get(MessageHistoryThreadData.self)
threadData = transaction.getMessageHistoryThreadInfo(peerId: message.id.peerId, threadId: Int64(threadId.id))?.data.get(MessageHistoryThreadData.self)
}
}
}