mirror of
https://github.com/aljazceru/signal-cli.git
synced 2025-12-25 01:54:26 +01:00
Only update account attributes if already registered
This commit is contained in:
@@ -250,13 +250,15 @@ public class Manager implements Closeable {
|
||||
Manager m = new Manager(account, pathConfig, serviceConfiguration, userAgent);
|
||||
|
||||
m.migrateLegacyConfigs();
|
||||
m.updateAccountAttributes();
|
||||
if (m.isRegistered()) {
|
||||
m.updateAccountAttributes();
|
||||
}
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
private void migrateLegacyConfigs() {
|
||||
if (account.getProfileKey() == null) {
|
||||
if (account.getProfileKey() == null && isRegistered()) {
|
||||
// Old config file, creating new profile key
|
||||
account.setProfileKey(KeyUtils.createProfileKey());
|
||||
account.save();
|
||||
|
||||
Reference in New Issue
Block a user