- String packId;
- String packKey;
- int stickerId;
-
- public JsonSticker(SignalServiceDataMessage.Sticker sticker) {
- this.packId = Base64.encodeBytes(sticker.getPackId());
- this.packKey = Base64.encodeBytes(sticker.getPackKey());
- this.stickerId = sticker.getStickerId();
- // TODO also download sticker image ??
+ static JsonSticker from(MessageEnvelope.Data.Sticker sticker) {
+ final var packId = Hex.toStringCondensed(sticker.packId().serialize());
+ final var stickerId = sticker.stickerId();
+ return new JsonSticker(packId, stickerId);