Files
npub1qyvc0c5kl4gqv2fd97fsk46tu378sqgy35vc83rvgfwne90sel7s0ed67dandTyler Longwell 8c3d8f022f feat(cli): support visibility on channels update
Visibility (open/private) was a create-time-only field: `channels
create` took `--visibility`, but `channels update` only handled
name/description/ttl, so there was no way to flip a channel's
visibility after creation from the CLI.

The plumbing already existed below the CLI: `buzz_sdk::build_update_channel`
accepts a `visibility` arg and emits the `["visibility", v]` tag on the
kind:9002 edit-metadata event, and the relay validates the value, gates
it behind owner/admin auth, applies the DB update, invalidates the
visibility/accessible-channel caches, and emits a visibility_changed
event. The CLI just hardcoded `None` and exposed no flag.

Wire `--visibility <open|private>` through `channels update` as a clap
ValueEnum (matching `channels create`), so invalid values are rejected
at parse time, and thread it into build_update_channel. Visibility is
also included in the no-op guard and its error message.

Live-tested against a real channel: open->private->open, each flip
confirmed via the stored kind:9002 visibility tag.

Co-authored-by: Tyler Longwell <tlongwell@block.xyz>
Signed-off-by: Tyler Longwell <tlongwell@block.xyz>
2026-06-29 10:17:50 -04:00
..