-public record JsonSticker(String packId, String packKey, int stickerId) {
-
- static JsonSticker from(SignalServiceDataMessage.Sticker sticker) {
- final var packId = Base64.getEncoder().encodeToString(sticker.getPackId());
- final var packKey = Base64.getEncoder().encodeToString(sticker.getPackKey());
- final var stickerId = sticker.getStickerId();
- return new JsonSticker(packId, packKey, stickerId);
+ 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);