mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-02 15:46:53 +00:00
Ignore already-locked accounts in PNI key cleanup operations
This commit is contained in:
1 parent
7cf89764e7
commit
287da6e7e3
2 files changed
+2
No files matched your search
+1
@@ -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())
|
||||
|
||||
+1
@@ -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