mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-30 19:10:38 +00:00
Change stickerId to hex everywhere
Remove packKey from output
This commit is contained in:
parent
e70463d7b8
commit
beb3adcc72
12 changed files with 23 additions and 20 deletions
|
@ -1,16 +1,13 @@
|
|||
package org.asamk.signal.json;
|
||||
|
||||
import org.asamk.signal.manager.api.MessageEnvelope;
|
||||
import org.asamk.signal.util.Hex;
|
||||
|
||||
import java.util.Base64;
|
||||
|
||||
public record JsonSticker(String packId, String packKey, int stickerId) {
|
||||
public record JsonSticker(String packId, int stickerId) {
|
||||
|
||||
static JsonSticker from(MessageEnvelope.Data.Sticker sticker) {
|
||||
final var encoder = Base64.getEncoder();
|
||||
final var packId = encoder.encodeToString(sticker.packId());
|
||||
final var packKey = encoder.encodeToString(sticker.packKey());
|
||||
final var packId = Hex.toStringCondensed(sticker.packId().serialize());
|
||||
final var stickerId = sticker.stickerId();
|
||||
return new JsonSticker(packId, packKey, stickerId);
|
||||
return new JsonSticker(packId, stickerId);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue