import org.asamk.signal.storage.protocol.RecipientStore;
import org.asamk.signal.storage.protocol.SessionInfo;
import org.asamk.signal.storage.protocol.SignalServiceAddressResolver;
+import org.asamk.signal.storage.stickers.StickerStore;
import org.asamk.signal.storage.threads.LegacyJsonThreadStore;
import org.asamk.signal.storage.threads.ThreadInfo;
import org.asamk.signal.util.IOUtils;
private JsonContactsStore contactStore;
private RecipientStore recipientStore;
private ProfileStore profileStore;
+ private StickerStore stickerStore;
private SignalAccount(final FileChannel fileChannel, final FileLock lock) {
this.fileChannel = fileChannel;
account.contactStore = new JsonContactsStore();
account.recipientStore = new RecipientStore();
account.profileStore = new ProfileStore();
+ account.stickerStore = new StickerStore();
account.registered = false;
return account;
account.contactStore = new JsonContactsStore();
account.recipientStore = new RecipientStore();
account.profileStore = new ProfileStore();
+ account.stickerStore = new StickerStore();
account.registered = true;
account.isMultiDevice = true;
profileStore = new ProfileStore();
}
+ JsonNode stickerStoreNode = rootNode.get("stickerStore");
+ if (stickerStoreNode != null) {
+ stickerStore = jsonProcessor.convertValue(stickerStoreNode, StickerStore.class);
+ }
+ if (stickerStore == null) {
+ stickerStore = new StickerStore();
+ }
+
JsonNode threadStoreNode = rootNode.get("threadStore");
if (threadStoreNode != null) {
LegacyJsonThreadStore threadStore = jsonProcessor.convertValue(threadStoreNode, LegacyJsonThreadStore.class);
.putPOJO("contactStore", contactStore)
.putPOJO("recipientStore", recipientStore)
.putPOJO("profileStore", profileStore)
+ .putPOJO("stickerStore", stickerStore)
;
try {
try (ByteArrayOutputStream output = new ByteArrayOutputStream()) {
return profileStore;
}
+ public StickerStore getStickerStore() {
+ return stickerStore;
+ }
+
public String getUsername() {
return username;
}