mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-20 09:08:02 +01:00
Ignore already-locked accounts in PNI key cleanup operations
This commit is contained in:
committed by
Jon Chambers
parent
7cf89764e7
commit
287da6e7e3
@@ -73,6 +73,7 @@ public class LockAccountsWithoutPniIdentityKeysCommand extends AbstractSinglePas
|
||||
final AccountsManager accountsManager = getCommandDependencies().accountsManager();
|
||||
|
||||
accounts
|
||||
.filter(account -> !account.hasLockedCredentials())
|
||||
.filter(account -> account.getIdentityKey(IdentityType.PNI) == null)
|
||||
.flatMap(accountWithoutPniIdentityKey -> {
|
||||
final String platform = DevicePlatformUtil.getDevicePlatform(accountWithoutPniIdentityKey.getPrimaryDevice())
|
||||
|
||||
@@ -77,6 +77,7 @@ public class RemoveLinkedDevicesWithoutPniKeysCommand extends AbstractSinglePass
|
||||
final KeysManager keysManager = getCommandDependencies().keysManager();
|
||||
|
||||
accounts
|
||||
.filter(account -> !account.hasLockedCredentials())
|
||||
.filter(account -> account.getDevices().size() > 1)
|
||||
.flatMap(account -> Flux.fromIterable(account.getDevices())
|
||||
.filter(device -> !device.isPrimary())
|
||||
|
||||
Reference in New Issue
Block a user