From d6eb8bdc964a7ea7a45dc688b19eda465a25e1fa Mon Sep 17 00:00:00 2001 From: Naomi Plasterer Date: Wed, 24 Jan 2024 07:22:20 -0800 Subject: [PATCH] add the fix to the decoded messages as well --- .../main/java/org/xmtp/android/library/Conversations.kt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/library/src/main/java/org/xmtp/android/library/Conversations.kt b/library/src/main/java/org/xmtp/android/library/Conversations.kt index 46fe1582b..747959b47 100644 --- a/library/src/main/java/org/xmtp/android/library/Conversations.kt +++ b/library/src/main/java/org/xmtp/android/library/Conversations.kt @@ -322,8 +322,13 @@ data class Conversations( Log.d(TAG, "discarding message, unknown conversation $envelope") return@mapNotNull null } - val msg = conversation.decodeOrNull(envelope) - msg + try { + val msg = conversation.decodeOrNull(envelope) + msg + } catch (e: Exception) { + Log.e(TAG, "Error decrypting message: $envelope", e) + null + } } }, )