mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
[WIP] Privacy update
This commit is contained in:
@@ -109,6 +109,24 @@ public extension TelegramEngine {
|
||||
return _internal_cachedAvailableReactions(postbox: self.account.postbox)
|
||||
}
|
||||
|
||||
public func savedMessageTags() -> Signal<([SavedMessageTags.Tag], [Int64: TelegramMediaFile]), NoError> {
|
||||
return self.account.postbox.transaction { transaction -> ([SavedMessageTags.Tag], [Int64: TelegramMediaFile]) in
|
||||
guard let savedMessageTags = _internal_savedMessageTags(transaction: transaction) else {
|
||||
return ([], [:])
|
||||
}
|
||||
var files: [Int64: TelegramMediaFile] = [:]
|
||||
for tag in savedMessageTags.tags {
|
||||
if case let .custom(fileId) = tag.reaction {
|
||||
let mediaId = MediaId(namespace: Namespaces.Media.CloudFile, id: fileId)
|
||||
if let file = transaction.getMedia(mediaId) as? TelegramMediaFile {
|
||||
files[fileId] = file
|
||||
}
|
||||
}
|
||||
}
|
||||
return (savedMessageTags.tags, files)
|
||||
}
|
||||
}
|
||||
|
||||
public func emojiSearchCategories(kind: EmojiSearchCategories.Kind) -> Signal<EmojiSearchCategories?, NoError> {
|
||||
return _internal_cachedEmojiSearchCategories(postbox: self.account.postbox, kind: kind)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user