parse paint_to_text attribute

This commit is contained in:
Mike Renoir
2022-12-09 12:17:28 +04:00
parent f0c0deb9ee
commit 2276ba1c5a
2 changed files with 7 additions and 5 deletions

View File

@@ -112,7 +112,8 @@ func telegramMediaFileAttributesFromApiAttributes(_ attributes: [Api.DocumentAtt
result.append(.Audio(isVoice: isVoice, duration: Int(duration), title: title, performer: performer, waveform: waveformBuffer))
case let .documentAttributeCustomEmoji(flags, alt, stickerSet):
let isFree = (flags & (1 << 0)) != 0
result.append(.CustomEmoji(isPremium: !isFree, alt: alt, packReference: StickerPackReference(apiInputSet: stickerSet)))
let paintToText = (flags & (1 << 1)) != 0
result.append(.CustomEmoji(isPremium: !isFree, paintToText: paintToText, alt: alt, packReference: StickerPackReference(apiInputSet: stickerSet)))
}
}
return result