From 9b870663ef6354e142cc001c82e04c99850a514b Mon Sep 17 00:00:00 2001 From: Logan Johnson Date: Mon, 19 Oct 2026 13:37:09 -0400 Subject: [PATCH] feat(relay): tag system-channel membership notices and hide them by default A system channel now sends the usual stored kind:44100/44101 notice with ["t","system"]. The relay returns a tagged notice only to a filter whose #t has "system". Existing clients never send that, so they see no change. The channel type is checked once, where the notice is signed. Every read then hides a tagged notice by default, in two places: - filters_match (buzz-core), which live fan-out and every historical post-filter use; - EventQuery (buzz-db), whose SQL excludes tagged notices unless include_system_notices is set, so COUNT and page limits stay exact. A read path that does not opt in therefore behaves as it does today. Because the notices are stored, a client can replay missed ones with `since` instead of rereading every channel on reconnect. Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz> Signed-off-by: Logan Johnson --- NOSTR.md | 7 +- crates/buzz-core/src/filter.rs | 92 +++++++ crates/buzz-db/src/store/event.rs | 40 +++ crates/buzz-relay/src/handlers/req.rs | 17 +- .../buzz-relay/src/handlers/side_effects.rs | 25 +- .../handlers/system_channel_postgres_tests.rs | 255 +++++++++++++++--- docs/nips/NIP-CL.md | 31 ++- 7 files changed, 421 insertions(+), 46 deletions(-) diff --git a/NOSTR.md b/NOSTR.md index 62e438d30d..bbde09d425 100644 --- a/NOSTR.md +++ b/NOSTR.md @@ -152,7 +152,9 @@ out unless they ask for it: combine with OR, so `#t:["system",