( sticker?: Proto.DataMessage.Sticker | null )
| 308 | } |
| 309 | |
| 310 | function processSticker( |
| 311 | sticker?: Proto.DataMessage.Sticker | null |
| 312 | ): ProcessedSticker | undefined { |
| 313 | if (!sticker) { |
| 314 | return undefined; |
| 315 | } |
| 316 | |
| 317 | return { |
| 318 | packId: sticker.packId ? Bytes.toHex(sticker.packId) : undefined, |
| 319 | packKey: sticker.packKey ? Bytes.toBase64(sticker.packKey) : undefined, |
| 320 | stickerId: sticker.stickerId ?? 0, |
| 321 | emoji: |
| 322 | sticker.emoji != null |
| 323 | ? Emoji.unsafeCastMaybeInvalidStringToVariant(sticker.emoji) |
| 324 | : undefined, |
| 325 | data: processAttachment(sticker.data), |
| 326 | }; |
| 327 | } |
| 328 | |
| 329 | function processReaction( |
| 330 | reaction?: Proto.DataMessage.Reaction | null |
no test coverage detected