]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/Manager.java
Add ListGroups command
[signal-cli] / src / main / java / org / asamk / signal / Manager.java
index a6dfcae5a7edf779c6421c209bc512c8c6432e98..2b2d1d70d4c37d699eab31f061260b8985e44a49 100644 (file)
@@ -356,6 +356,10 @@ class Manager implements Signal {
         save();
     }
 
+    public void updateAccountAttributes() throws IOException {
+        accountManager.setAccountAttributes(signalingKey, signalProtocolStore.getLocalRegistrationId(), false, false,true);
+    }
+
     public void unregister() throws IOException {
         // When setting an empty GCM id, the Signal-Server also sets the fetchesMessages property to false.
         // If this is the master device, other users can't send messages to this number anymore.
@@ -503,7 +507,7 @@ class Manager implements Signal {
     public void verifyAccount(String verificationCode) throws IOException {
         verificationCode = verificationCode.replace("-", "");
         signalingKey = Util.getSecret(52);
-        accountManager.verifyAccountWithCode(verificationCode, signalingKey, signalProtocolStore.getLocalRegistrationId(), false, true);
+        accountManager.verifyAccountWithCode(verificationCode, signalingKey, signalProtocolStore.getLocalRegistrationId(), false, false,true);
 
         //accountManager.setGcmId(Optional.of(GoogleCloudMessaging.getInstance(this).register(REGISTRATION_ID)));
         registered = true;
@@ -576,6 +580,10 @@ class Manager implements Signal {
         }
         throw new NotAGroupMemberException(groupId, g.name);
     }
+    
+    public List<GroupInfo> getGroups() {
+       return groupStore.getGroups();
+    }
 
     @Override
     public void sendGroupMessage(String messageText, List<String> attachments,