mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-06 11:48:24 +00:00
fix: keep kind:1059 gift wraps out of the Android notifications tab
The desktop notifications redesign (ecedc4af) extracted the shared
NotificationKinds.SUBSCRIPTION_KINDS list from Android's
NotificationFeedFilter and rewired NOTIFICATION_KINDS to spread it. The
shared list includes GiftWrapEvent.KIND (1059) because it doubles as the
relay subscription filter (you must ask relays for wraps to receive
NIP-17 DMs) and because Desktop renders the wrap itself as a DM inbox
row. Android's display list never had 1059 before that commit, so the
delegation silently started rendering wrap envelopes in the
Notifications tab — with created_at randomized up to 2 days back per
NIP-59, producing misordered, undecryptable rows instead of routing DMs
to the chat screens.
Subtract GiftWrapEvent.KIND from the Android display set, restoring the
pre-extraction behavior (1059 was the only kind the delegation added).
SUBSCRIPTION_KINDS keeps 1059, so the desktop relay subscription, the
desktop OS-toast allow-list, and the desktop inbox DM rows are all
unaffected. Android push is likewise untouched: NotificationDispatcher
already excludes 1059/21059/13 and notifies on the unwrapped inner
event.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011A6iSrJJHUoz686eDnCQMV
This commit is contained in:
+13
-3
@@ -64,6 +64,7 @@ import com.vitorpamplona.quartz.nip53LiveActivities.streaming.LiveActivitiesEven
|
||||
import com.vitorpamplona.quartz.nip54Wiki.WikiNoteEvent
|
||||
import com.vitorpamplona.quartz.nip57Zaps.LnZapEvent
|
||||
import com.vitorpamplona.quartz.nip58Badges.award.BadgeAwardEvent
|
||||
import com.vitorpamplona.quartz.nip59Giftwrap.wraps.GiftWrapEvent
|
||||
import com.vitorpamplona.quartz.nip64Chess.challenge.accept.LiveChessGameAcceptEvent
|
||||
import com.vitorpamplona.quartz.nip64Chess.move.LiveChessMoveEvent
|
||||
import com.vitorpamplona.quartz.nip68Picture.PictureEvent
|
||||
@@ -126,9 +127,18 @@ class NotificationFeedFilter(
|
||||
// highlights, polls, videos, voice, public messages,
|
||||
// live-activities chat) stay here because Desktop has no
|
||||
// rendering for those kinds today.
|
||||
com.vitorpamplona.amethyst.commons.moderation.notifications.NotificationKinds
|
||||
.SUBSCRIPTION_KINDS
|
||||
.toSet() +
|
||||
//
|
||||
// GiftWrap (1059) is subscription-only: the wrap is an envelope whose
|
||||
// created_at is randomized up to 2 days back (NIP-59), so rendering it
|
||||
// as a feed row would misorder the tab with undecryptable entries. On
|
||||
// Android the unwrapped inner event (kind 14/15/…) is what notifies —
|
||||
// same rule NotificationDispatcher applies to push. Desktop keeps the
|
||||
// wrap in its inbox because it has no unwrap pipeline there yet.
|
||||
(
|
||||
com.vitorpamplona.amethyst.commons.moderation.notifications.NotificationKinds
|
||||
.SUBSCRIPTION_KINDS
|
||||
.toSet() - GiftWrapEvent.KIND
|
||||
) +
|
||||
setOf(
|
||||
BadgeAwardEvent.KIND,
|
||||
GitIssueEvent.KIND,
|
||||
|
||||
Reference in New Issue
Block a user