mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Only allow animated stickers from packs
This commit is contained in:
@@ -351,7 +351,14 @@ public final class ChatMessageItem: ListViewItem, CustomStringConvertible {
|
||||
if telegramFile.isAnimatedSticker, (self.message.id.peerId.namespace == Namespaces.Peer.SecretChat || !telegramFile.previewRepresentations.isEmpty), let size = telegramFile.size, size > 0 && size <= 128 * 1024 {
|
||||
if self.message.id.peerId.namespace == Namespaces.Peer.SecretChat {
|
||||
if telegramFile.fileId.namespace == Namespaces.Media.CloudFile {
|
||||
viewClassName = ChatMessageAnimatedStickerItemNode.self
|
||||
inner: for attribute in telegramFile.attributes {
|
||||
if case let .Sticker(_, packReference, _) = attribute {
|
||||
if case .name = packReference {
|
||||
viewClassName = ChatMessageAnimatedStickerItemNode.self
|
||||
}
|
||||
break inner
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
viewClassName = ChatMessageAnimatedStickerItemNode.self
|
||||
|
||||
Reference in New Issue
Block a user