From f24f8e7ba3a69da2cc7f6f1d994356f6d47fba34 Mon Sep 17 00:00:00 2001 From: Logan Johnson Date: Mon, 19 Oct 2026 15:54:19 -0400 Subject: [PATCH] feat(relay): tag every membership notice with its channel type Every kind:44100/44101 notice now carries `["t", ]`. A filter sees a notice only if it knows the type: a filter with `#t` sees the types it names, and a filter without `#t` sees only the frozen legacy types (stream, forum, dm, workflow). A type added later is hidden from old clients by default, so a read path that is not updated fails closed. An untagged notice, stored before this change, counts as a legacy type, so replay across the upgrade stays complete. One filter that names every type reads all notices. The rule lives in buzz-core (`notice_visible`) and in one SQL predicate (`push_notice_visibility`), which defaults to legacy types. The relay reads the channel type in one place, `emit_membership_notification`, and sends no notice when the channel row is missing. Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson --- NOSTR.md | 13 +- crates/buzz-core/src/filter.rs | 175 ++++++++++++------ crates/buzz-db/src/store/channel_members.rs | 34 +++- crates/buzz-db/src/store/event.rs | 74 +++++--- crates/buzz-relay/src/handlers/req.rs | 21 +-- .../buzz-relay/src/handlers/side_effects.rs | 33 ++-- .../handlers/system_channel_postgres_tests.rs | 137 +++++++++++--- docs/nips/NIP-CL.md | 41 ++-- 8 files changed, 372 insertions(+), 156 deletions(-) diff --git a/NOSTR.md b/NOSTR.md index bbde09d425..96ccb0edc0 100644 --- a/NOSTR.md +++ b/NOSTR.md @@ -152,9 +152,10 @@ out unless they ask for it: combine with OR, so `#t:["system",