]> nmode's Git Repositories - signal-cli/commitdiff
Create an initial empty profile after registration
authorAsamK <asamk@gmx.de>
Mon, 3 May 2021 15:46:53 +0000 (17:46 +0200)
committerAsamK <asamk@gmx.de>
Mon, 3 May 2021 16:43:45 +0000 (18:43 +0200)
lib/src/main/java/org/asamk/signal/manager/Manager.java
lib/src/main/java/org/asamk/signal/manager/RegistrationManager.java
man/signal-cli.1.adoc

index 1e7040b1c5d45f5d33be67fbe38c57f3e26a2cf5..827d6d91742c6db4d9d5f1eef99accc863cd8b8c 100644 (file)
@@ -381,8 +381,8 @@ public class Manager implements Closeable {
             accountManager.setVersionedProfile(account.getUuid(),
                     account.getProfileKey(),
                     newProfile.getInternalServiceName(),
-                    newProfile.getAbout(),
-                    newProfile.getAboutEmoji(),
+                    newProfile.getAbout() == null ? "" : newProfile.getAbout(),
+                    newProfile.getAboutEmoji() == null ? "" : newProfile.getAboutEmoji(),
                     streamDetails);
         }
 
index e95cb458b74578249610cab2d610e3728a190cc5..b6d12e29f150e6cf7ed09de0acff6406a5cf9db0 100644 (file)
@@ -161,6 +161,8 @@ public class RegistrationManager implements Closeable {
             account = null;
 
             m.refreshPreKeys();
+            // Set an initial empty profile so user can be added to groups
+            m.setProfile(null, null, null, null);
 
             final var result = m;
             m = null;
index 565909a5811371401d7f0e1030fb81d057b5df3a..af298b2708bd46cbf398624240c75ce839aaae3b 100644 (file)
@@ -227,8 +227,6 @@ Don’t download attachments of received messages.
 === joinGroup
 
 Join a group via an invitation link.
-To be able to join a v2 group the account needs to have a profile (can be created
-with the `updateProfile` command)
 
 *--uri*::
 The invitation link URI (starts with `https://signal.group/#`)
@@ -237,8 +235,6 @@ The invitation link URI (starts with `https://signal.group/#`)
 
 Create or update a group.
 If the user is a pending member, this command will accept the group invitation.
-To be able to join or create a v2 group the account needs to have a profile (can
-be created with the `updateProfile` command)
 
 *-g* GROUP, *--group* GROUP::
 Specify the recipient group ID in base64 encoding.