mirror of
https://github.com/aljazceru/signal-cli.git
synced 2026-01-08 00:14:27 +01:00
Manager : removeLinkedDevices updates isMultiDevice and saves the account
Manager : addDevice, getLinkedDevices save the account SignalAccount : save/load isMultiDevice SignalAccount : save profileKey SignalAccount : registrationLockPin doesn't automagically becomes the "null" string, and stays null if null
This commit is contained in:
@@ -248,11 +248,15 @@ public class Manager implements Signal {
|
||||
public List<DeviceInfo> getLinkedDevices() throws IOException {
|
||||
List<DeviceInfo> devices = accountManager.getDevices();
|
||||
account.setMultiDevice(devices.size() > 1);
|
||||
account.save();
|
||||
return devices;
|
||||
}
|
||||
|
||||
public void removeLinkedDevices(int deviceId) throws IOException {
|
||||
accountManager.removeDevice(deviceId);
|
||||
List<DeviceInfo> devices = accountManager.getDevices();
|
||||
account.setMultiDevice(devices.size() > 1);
|
||||
account.save();
|
||||
}
|
||||
|
||||
public void addDeviceLink(URI linkUri) throws IOException, InvalidKeyException {
|
||||
@@ -267,6 +271,7 @@ public class Manager implements Signal {
|
||||
|
||||
accountManager.addDevice(deviceIdentifier, deviceKey, identityKeyPair, Optional.of(account.getProfileKey()), verificationCode);
|
||||
account.setMultiDevice(true);
|
||||
account.save();
|
||||
}
|
||||
|
||||
private List<PreKeyRecord> generatePreKeys() {
|
||||
|
||||
Reference in New Issue
Block a user