From 29e66eaa79a168671b8c605ff2d0a9754beba68e Mon Sep 17 00:00:00 2001 From: Alejandro Date: Fri, 15 Sep 2023 17:53:06 -0300 Subject: [PATCH] Check if rsaPublicKey is not null before sending message to the people the user wants to connect --- .../java/chat/sphinx/feature_repository/SphinxRepository.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sphinx/application/data/features/feature-repository/src/main/java/chat/sphinx/feature_repository/SphinxRepository.kt b/sphinx/application/data/features/feature-repository/src/main/java/chat/sphinx/feature_repository/SphinxRepository.kt index ee4951f3cf..0412fc55bc 100644 --- a/sphinx/application/data/features/feature-repository/src/main/java/chat/sphinx/feature_repository/SphinxRepository.kt +++ b/sphinx/application/data/features/feature-repository/src/main/java/chat/sphinx/feature_repository/SphinxRepository.kt @@ -1196,7 +1196,9 @@ abstract class SphinxRepository( response = loadResponse } is Response.Success -> { - val contact = getContactByPubKey(lightningNodePubKey).firstOrNull() + val contact = getContactByPubKey(lightningNodePubKey).firstOrNull { + it?.rsaPublicKey != null + } response = if (contact != null) { val messageBuilder = SendMessage.Builder()