mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-09 08:04:45 +00:00
A Buzz DM is a relay-authoritative NIP-29 group whose messages carry no `p` tag, so nothing made them eligible for the Notifications tab and nothing fetched them app-wide (discovery was scoped to the open DM inbox, which only pulls 44100 + 39000 — never the message bodies). Two halves fix that: - NotificationFeedFilter now early-accepts a group chat message (kind-9 or kind-40002 — the deployed relay uses both) when it resolves to a `t=dm` channel whose 39000 participants include me, honoring the same "Messages in notifications" toggle and never notifying for my own message. LocalCache gains `getRelayGroupChannelForContent`, the read-only reverse-lookup this needs (same serving-relay-then-single-channel keying as the consume path). - An always-on discovery (BuzzDmDiscoveryPreload) subscribes 44100 #p=me across joined workspaces into the new BuzzDmChannels registry and fetches each DM's 39000 directory; BuzzDmJoinedChatTailFilterAssembler then keeps those channels' recent messages warm app-wide (reusing the joined-group #h tail), excluding hidden DMs. Both mount in LoggedInPage. This is what makes a Buzz DM show on Notifications / in push without opening the conversation. Tests: BuzzDmChannels registry; and a LocalCache resolution test proving a 40002 and a kind-9 message both resolve back to their DM channel (and a non-dm channel does not). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>