From 44a34ffcfee2405ef0117390af27e866527e870c Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Tue, 9 Sep 2025 11:25:30 -0400 Subject: [PATCH] Removes livestream chats from the home bubbles that are placed after the live stream is done --- .../ui/screen/loggedIn/home/dal/HomeLiveFilter.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/home/dal/HomeLiveFilter.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/home/dal/HomeLiveFilter.kt index eb3be9e65..ef219b50f 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/home/dal/HomeLiveFilter.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/home/dal/HomeLiveFilter.kt @@ -156,6 +156,16 @@ class HomeLiveFilter( ): Boolean { val createdAt = note.createdAt() ?: return false val noteEvent = note.event + + if (noteEvent is LiveActivitiesChatMessageEvent) { + val stream = noteEvent.activityAddress() + if (stream == null) return false + val streamChannel = LocalCache.getLiveActivityChannelIfExists(stream) + if (streamChannel == null) return false + + if (streamChannel.info?.status() != StatusTag.STATUS.LIVE) return false + } + return (noteEvent is EphemeralChatEvent || noteEvent is LiveActivitiesChatMessageEvent) && createdAt > timeLimit && filterParams.match(noteEvent, note.relays)