MCPcopy
hub / github.com/signalapp/Signal-Desktop / processSticker

Function processSticker

ts/textsecure/processDataMessage.preload.ts:310–327  ·  view source on GitHub ↗
(
  sticker?: Proto.DataMessage.Sticker | null
)

Source from the content-addressed store, hash-verified

308}
309
310function 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
329function processReaction(
330 reaction?: Proto.DataMessage.Reaction | null

Callers 1

processDataMessageFunction · 0.70

Calls 3

toHexMethod · 0.80
toBase64Method · 0.80
processAttachmentFunction · 0.70

Tested by

no test coverage detected