Skip to content

Commit 3e94c70

Browse files
Ezequiel Leanesnplasterer
Ezequiel Leanes
andauthored
fix: add catch to listBatchDecryptedMessages method (#161)
* fix: add catch to listBatchDecryptedMessages method * add the fix to the decoded messages as well * Revert "add the fix to the decoded messages as well" This reverts commit d6eb8bd. --------- Co-authored-by: Naomi Plasterer <naomi@xmtp.com>
1 parent 1a1e055 commit 3e94c70

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

library/src/main/java/org/xmtp/android/library/Conversations.kt

+7-2
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,13 @@ data class Conversations(
358358
Log.d(TAG, "discarding message, unknown conversation $envelope")
359359
return@mapNotNull null
360360
}
361-
val msg = conversation.decrypt(envelope)
362-
msg
361+
try {
362+
val msg = conversation.decrypt(envelope)
363+
msg
364+
} catch (e: Exception) {
365+
Log.e(TAG, "Error decrypting message: $envelope", e)
366+
null
367+
}
363368
}
364369
},
365370
)

0 commit comments

Comments
 (0)