Skip to content

Commit

Permalink
Clear Redis cache entries strictly after removing accounts from DynamoDB
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-signal committed Dec 21, 2023
1 parent 057d1f0 commit 5d6bea5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,8 @@ private CompletableFuture<Void> delete(final Account account) {
messagesManager.clear(account.getPhoneNumberIdentifier()),
profilesManager.deleteAll(account.getUuid()),
registrationRecoveryPasswordsManager.removeForNumber(account.getNumber()))
.thenCompose(ignored -> CompletableFuture.allOf(accounts.delete(account.getUuid(), additionalWriteItems), redisDeleteAsync(account)))
.thenCompose(ignored -> accounts.delete(account.getUuid(), additionalWriteItems))
.thenCompose(ignored -> redisDeleteAsync(account))
.thenRun(() -> RedisOperation.unchecked(() ->
account.getDevices().forEach(device ->
clientPresenceManager.disconnectPresence(account.getUuid(), device.getId()))));
Expand Down

0 comments on commit 5d6bea5

Please sign in to comment.