mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Only update account attributes if already registered
This commit is contained in:
parent
4acc9a96e3
commit
6bfcba4940
1 changed files with 4 additions and 2 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue