From ae4167ddaecdf33c61f5c88165b4acb4e1fc9fe4 Mon Sep 17 00:00:00 2001 From: Greyson Parrelli Date: Wed, 7 Jul 2021 12:19:04 -0400 Subject: [PATCH] Write to RecipientIdCache on cache miss. --- .../org/thoughtcrime/securesms/recipients/RecipientId.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/recipients/RecipientId.java b/app/src/main/java/org/thoughtcrime/securesms/recipients/RecipientId.java index a7a4d97fc..225a6d093 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/recipients/RecipientId.java +++ b/app/src/main/java/org/thoughtcrime/securesms/recipients/RecipientId.java @@ -95,7 +95,9 @@ public class RecipientId implements Parcelable, Comparable { RecipientId recipientId = RecipientIdCache.INSTANCE.get(uuid, e164); if (recipientId == null) { - recipientId = Recipient.externalPush(ApplicationDependencies.getApplication(), uuid, e164, highTrust).getId(); + Recipient recipient = Recipient.externalPush(ApplicationDependencies.getApplication(), uuid, e164, highTrust); + RecipientIdCache.INSTANCE.put(recipient); + recipientId = recipient.getId(); } return recipientId;