From c55f46cb2b0cddb1cec98c775f960f4609a2eb7b Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 23 Jul 2026 20:33:49 +0000 Subject: [PATCH] feat(notifications): push-notify Buzz-style bare reactions/reposts to your note A Buzz like is a bare ["e", ] reaction with no p tag, so the push gate's (isTaggedUser || publicChatReply) pre-clause rejected it even though tagsAnEventByUser already recognizes a reaction/repost whose reacted note is mine. Relax the pre-clause for reaction/repost kinds; tagsAnEventByUser keeps it scoped to reactions on my own note. Reuses the existing Reaction/Repost renderers. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_0122uQ8BLHLeHDni81RBP26r --- .../service/notifications/NotificationDispatcher.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/notifications/NotificationDispatcher.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/notifications/NotificationDispatcher.kt index c90a45b1ee..8c081bf51f 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/notifications/NotificationDispatcher.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/notifications/NotificationDispatcher.kt @@ -216,6 +216,13 @@ class NotificationDispatcher( // tagsAnEventByUser's replyTo check would otherwise // always miss for replies into addressable posts. val note = LocalCache.getNoteIfExists(event) ?: return@predicate false + // Reactions/reposts are routed by tagsAnEventByUser + // (the reacted note's author == me), not by a `p` + // tag — so a Buzz-style bare `["e", id]` like, which + // carries no `p` tag, still notifies. tagsAnEventByUser + // below keeps it scoped to reactions on MY note. + val isReactionOrRepost = + event is ReactionEvent || event is RepostEvent || event is GenericRepostEvent pubkeys.any { pubkey -> // Public chat replies into my own messages often // omit the `p` tag; relax the gate for them (the @@ -223,6 +230,7 @@ class NotificationDispatcher( // messages actually replying to me). ( event.isTaggedUser(pubkey) || + isReactionOrRepost || NotificationFeedFilter.isNotifiablePublicChatReply(note, pubkey) ) && NotificationFeedFilter.tagsAnEventByUser(note, pubkey)