]> nmode's Git Repositories - signal-cli/blobdiff - lib/src/main/java/org/asamk/signal/manager/ManagerImpl.java
Dbus get/setConfiguration methods
[signal-cli] / lib / src / main / java / org / asamk / signal / manager / ManagerImpl.java
index 0fd1eb33cf0d69a937f45ab6e52c4d0a91b2ccb8..b8414329d77ccc14b7037a8ca7ef658d3faa4541 100644 (file)
@@ -347,6 +347,19 @@ public class ManagerImpl implements Manager {
         syncHelper.sendConfigurationMessage();
     }
 
+    @Override
+    public List<Boolean> 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