mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-02 16:16:53 +00:00
Don't assume phone number identifier presence in parsing account JSON or writing accounts to Redis
This commit is contained in:
1 parent
9870accbae
commit
8d0ea9f67a
1 file changed
+1
-1
@@ -1362,7 +1362,7 @@ public class AccountsManager extends RedisPubSubAdapter<String, String> implemen
|
||||
return cacheCluster.withCluster(connection -> CompletableFuture.allOf(
|
||||
account.getPhoneNumberIdentifierOptional().map(pni ->
|
||||
connection.async().setex(getAccountMapKey(pni.toString()), CACHE_TTL_SECONDS, account.getAccountIdentifier().toString())
|
||||
.toCompletableFuture())
|
||||
.toCompletableFuture())
|
||||
.orElseGet(() -> CompletableFuture.completedFuture(null)),
|
||||
connection.async().setex(getAccountEntityKey(account.getAccountIdentifier()), CACHE_TTL_SECONDS, accountJson)
|
||||
.toCompletableFuture()));
|
||||
|
||||
Reference in new issue
Block a user