]> nmode's Git Repositories - signal-cli/blobdiff - lib/src/main/java/org/asamk/signal/manager/ManagerImpl.java
Merge branch master into dbus_updateConfiguration
[signal-cli] / lib / src / main / java / org / asamk / signal / manager / ManagerImpl.java
index d2ffaaabe577d8c6d2a7bf749a24fe70712ce457..a4121e29279e44e5befe13dd47e577647d34126e 100644 (file)
@@ -344,6 +344,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