From d704352f1f70d37f48747d0efce8756be4a8af60 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Wed, 1 Mar 2023 14:00:03 -0500 Subject: [PATCH] Notifications now require the Notified to be the author of the post the notification is mentioning. --- .../amethyst/ui/dal/NotificationFeedFilter.kt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/dal/NotificationFeedFilter.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/dal/NotificationFeedFilter.kt index 67567ed2e..06a7e534d 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/dal/NotificationFeedFilter.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/dal/NotificationFeedFilter.kt @@ -23,6 +23,19 @@ object NotificationFeedFilter: FeedFilter() { && it.event !is ChannelMetadataEvent && it.event !is LnZapRequestEvent } + .filter { + it.event !is TextNoteEvent + || + ( + it.event is TextNoteEvent + && + ( + it.replyTo?.any { it.author == account.userProfile() } == true + || + account.userProfile() in it.directlyCiteUsers() + ) + ) + } .filter { it.event !is ReactionEvent ||