Summary
buzz_sdk::build_add_member (used by buzz-cli channels add-member) builds its kind:9000 event via a plain EventBuilder::new(...).tags([h, p, role]) without calling .allow_self_tagging(). The nostr crate's EventBuilder strips any p tag matching the signer's own pubkey by default (documented behavior — allow_self_tagging() exists precisely to opt out), so a self-targeted add-member call (e.g. an owner explicitly granting themselves membership on a channel they didn't get auto-added to — see #6240) silently loses its p tag before signing.
The relay then rejects the resulting event with a confusing invalid: missing p tag — which reads as if the CLI passed a bad --pubkey, when actually the tag was present in the builder and was stripped later, invisibly, during signing.
Repro
buzz channels add-member --channel <id> --pubkey <own-pubkey> --role admin
# → {"error":"relay_error","message":"relay error 400: invalid: missing p tag","retryable":false}
The identical call with a different (non-self) target pubkey succeeds normally.
Suggested fix
In buzz_sdk::build_add_member (and any other builder in buzz-sdk that constructs a structural/administrative p tag rather than a social "mention"), call .allow_self_tagging() before signing, since these aren't NIP-10-style mention tags and self-targeting is a legitimate, expected case.
Found while working around #6240.
Summary
buzz_sdk::build_add_member(used bybuzz-cli channels add-member) builds its kind:9000 event via a plainEventBuilder::new(...).tags([h, p, role])without calling.allow_self_tagging(). Thenostrcrate'sEventBuilderstrips anyptag matching the signer's own pubkey by default (documented behavior —allow_self_tagging()exists precisely to opt out), so a self-targetedadd-membercall (e.g. an owner explicitly granting themselves membership on a channel they didn't get auto-added to — see #6240) silently loses itsptag before signing.The relay then rejects the resulting event with a confusing
invalid: missing p tag— which reads as if the CLI passed a bad--pubkey, when actually the tag was present in the builder and was stripped later, invisibly, during signing.Repro
The identical call with a different (non-self) target pubkey succeeds normally.
Suggested fix
In
buzz_sdk::build_add_member(and any other builder inbuzz-sdkthat constructs a structural/administrativeptag rather than a social "mention"), call.allow_self_tagging()before signing, since these aren't NIP-10-style mention tags and self-targeting is a legitimate, expected case.Found while working around #6240.