From c1d127ac1e251f37a72adec547f32692272ca977 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Wed, 10 May 2023 13:31:25 -0400 Subject: [PATCH] Fixing blank messages and Zapped DM content --- .../service/notifications/EventNotificationConsumer.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/service/notifications/EventNotificationConsumer.kt b/app/src/main/java/com/vitorpamplona/amethyst/service/notifications/EventNotificationConsumer.kt index e971ed0a6..0d7fcd26f 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/service/notifications/EventNotificationConsumer.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/service/notifications/EventNotificationConsumer.kt @@ -74,10 +74,12 @@ class EventNotificationConsumer(private val applicationContext: Context) { } } - val zappedContent = noteZapped?.event?.content()?.split("\n")?.get(0)?.take(50) + val zappedContent = + noteZapped?.let { it1 -> acc.decryptContent(it1)?.split("\n")?.get(0)?.take(50) } + val user = senderInfo?.first?.toBestDisplayName() ?: "" var title = applicationContext.getString(R.string.app_notification_zaps_channel_message, amount) - senderInfo?.second?.let { + senderInfo?.second?.ifBlank { null }?.let { title += " ($it)" } var content = applicationContext.getString(R.string.app_notification_zaps_channel_message_from, user)