mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +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
|
@ -30,6 +30,7 @@ import org.asamk.signal.manager.api.SendGroupMessageResults;
|
|||
import org.asamk.signal.manager.api.SendMessageResult;
|
||||
import org.asamk.signal.manager.api.SendMessageResults;
|
||||
import org.asamk.signal.manager.api.StickerPack;
|
||||
import org.asamk.signal.manager.api.StickerPackId;
|
||||
import org.asamk.signal.manager.api.TypingAction;
|
||||
import org.asamk.signal.manager.api.UnregisteredRecipientException;
|
||||
import org.asamk.signal.manager.api.UpdateGroup;
|
||||
|
@ -49,7 +50,6 @@ import org.asamk.signal.manager.storage.recipients.Profile;
|
|||
import org.asamk.signal.manager.storage.recipients.RecipientAddress;
|
||||
import org.asamk.signal.manager.storage.recipients.RecipientId;
|
||||
import org.asamk.signal.manager.storage.stickers.Sticker;
|
||||
import org.asamk.signal.manager.storage.stickers.StickerPackId;
|
||||
import org.asamk.signal.manager.util.AttachmentUtils;
|
||||
import org.asamk.signal.manager.util.KeyUtils;
|
||||
import org.asamk.signal.manager.util.StickerUtils;
|
||||
|
|
|
@ -2,7 +2,7 @@ package org.asamk.signal.manager;
|
|||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
import org.asamk.signal.manager.storage.stickers.StickerPackId;
|
||||
import org.asamk.signal.manager.api.StickerPackId;
|
||||
import org.asamk.signal.manager.util.IOUtils;
|
||||
import org.asamk.signal.manager.util.Utils;
|
||||
import org.whispersystems.signalservice.api.util.StreamDetails;
|
||||
|
|
|
@ -322,10 +322,12 @@ public record MessageEnvelope(
|
|||
}
|
||||
}
|
||||
|
||||
public record Sticker(byte[] packId, byte[] packKey, int stickerId) {
|
||||
public record Sticker(StickerPackId packId, byte[] packKey, int stickerId) {
|
||||
|
||||
static Sticker from(SignalServiceDataMessage.Sticker sticker) {
|
||||
return new Sticker(sticker.getPackId(), sticker.getPackKey(), sticker.getStickerId());
|
||||
return new Sticker(StickerPackId.deserialize(sticker.getPackId()),
|
||||
sticker.getPackKey(),
|
||||
sticker.getStickerId());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package org.asamk.signal.manager.api;
|
||||
|
||||
import org.asamk.signal.manager.storage.stickers.StickerPackId;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package org.asamk.signal.manager.storage.stickers;
|
||||
package org.asamk.signal.manager.api;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
|
@ -20,6 +20,7 @@ import org.asamk.signal.manager.actions.SendSyncGroupsAction;
|
|||
import org.asamk.signal.manager.actions.SendSyncKeysAction;
|
||||
import org.asamk.signal.manager.api.MessageEnvelope;
|
||||
import org.asamk.signal.manager.api.Pair;
|
||||
import org.asamk.signal.manager.api.StickerPackId;
|
||||
import org.asamk.signal.manager.groups.GroupId;
|
||||
import org.asamk.signal.manager.groups.GroupNotFoundException;
|
||||
import org.asamk.signal.manager.groups.GroupUtils;
|
||||
|
@ -29,7 +30,6 @@ import org.asamk.signal.manager.storage.groups.GroupInfoV1;
|
|||
import org.asamk.signal.manager.storage.recipients.Profile;
|
||||
import org.asamk.signal.manager.storage.recipients.RecipientId;
|
||||
import org.asamk.signal.manager.storage.stickers.Sticker;
|
||||
import org.asamk.signal.manager.storage.stickers.StickerPackId;
|
||||
import org.signal.libsignal.metadata.ProtocolInvalidKeyException;
|
||||
import org.signal.libsignal.metadata.ProtocolInvalidKeyIdException;
|
||||
import org.signal.libsignal.metadata.ProtocolInvalidMessageException;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.asamk.signal.manager.jobs;
|
||||
|
||||
import org.asamk.signal.manager.JsonStickerPack;
|
||||
import org.asamk.signal.manager.api.StickerPackId;
|
||||
import org.asamk.signal.manager.helper.Context;
|
||||
import org.asamk.signal.manager.storage.stickers.StickerPackId;
|
||||
import org.asamk.signal.manager.util.IOUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package org.asamk.signal.manager.storage.stickers;
|
||||
|
||||
import org.asamk.signal.manager.api.StickerPackId;
|
||||
|
||||
public class Sticker {
|
||||
|
||||
private final StickerPackId packId;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package org.asamk.signal.manager.storage.stickers;
|
||||
|
||||
import org.asamk.signal.manager.api.StickerPackId;
|
||||
|
||||
import java.util.Base64;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue