X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/9839be48f3ff80456ddec3ad28cf0b583bf80226..8416d4a:/lib/src/main/java/org/asamk/signal/manager/ManagerImpl.java diff --git a/lib/src/main/java/org/asamk/signal/manager/ManagerImpl.java b/lib/src/main/java/org/asamk/signal/manager/ManagerImpl.java index 86ec34c1..b8414329 100644 --- a/lib/src/main/java/org/asamk/signal/manager/ManagerImpl.java +++ b/lib/src/main/java/org/asamk/signal/manager/ManagerImpl.java @@ -209,7 +209,7 @@ public class ManagerImpl implements Manager { avatarStore, this::resolveSignalServiceAddress, account.getRecipientStore()); - this.storageHelper = new StorageHelper(account, dependencies, groupHelper); + this.storageHelper = new StorageHelper(account, dependencies, groupHelper, profileHelper); this.contactHelper = new ContactHelper(account); this.syncHelper = new SyncHelper(account, attachmentHelper, @@ -347,6 +347,19 @@ public class ManagerImpl implements Manager { syncHelper.sendConfigurationMessage(); } + @Override + public List getConfiguration() throws IOException, NotMasterDeviceException { + if (!account.isMasterDevice()) { + throw new NotMasterDeviceException(); + } + final var configurationStore = account.getConfigurationStore(); + final Boolean readReceipts = configurationStore.getReadReceipts(); + final Boolean unidentifiedDeliveryIndicators = configurationStore.getUnidentifiedDeliveryIndicators(); + final Boolean typingIndicators = configurationStore.getTypingIndicators(); + final Boolean linkPreviews = configurationStore.getLinkPreviews(); + return List.of(readReceipts, unidentifiedDeliveryIndicators, typingIndicators, linkPreviews); + } + /** * @param givenName if null, the previous givenName will be kept * @param familyName if null, the previous familyName will be kept @@ -414,7 +427,7 @@ public class ManagerImpl implements Manager { } @Override - public void removeLinkedDevices(int deviceId) throws IOException { + public void removeLinkedDevices(long deviceId) throws IOException { dependencies.getAccountManager().removeDevice(deviceId); var devices = dependencies.getAccountManager().getDevices(); account.setMultiDevice(devices.size() > 1);