Skip to content

feat(relay): make NIP-11 name and description configurable - #6880

Open
A-PachecoT wants to merge 1 commit into
block:mainfrom
cofoundy:upstream/relay-name-configurable
Open

feat(relay): make NIP-11 name and description configurable#6880
A-PachecoT wants to merge 1 commit into
block:mainfrom
cofoundy:upstream/relay-name-configurable

Conversation

@A-PachecoT

Copy link
Copy Markdown

Problem

A self-hosted relay is a distinct workspace to the people using it, but every instance introduces itself as "Buzz Relay" — the product's name, not the operator's:

// crates/buzz-relay/src/nip11.rs
name: "Buzz Relay".to_string(),
description: "Buzz — private team communication relay".to_string(),

Clients surface this string, so an operator running Buzz for their own team has no way to make the deployment read as theirs. The Desktop's Edit Community → Name field looks like the answer but only writes to localStorage, so the NIP-11 document — what every other client reads — still says "Buzz Relay".

We hit this running Buzz for our own company: the workspace icon propagates fine via the kind:9033 command, so the deployment ends up showing our logo next to someone else's name.

Change

Adds RELAY_NAME and RELAY_DESCRIPTION, read at NIP-11 build time.

  • Defaults to the current strings, so no existing deployment changes behaviour.
  • Blank or whitespace-only values fall back to the default rather than advertising an empty name.
  • Values are trimmed.

Kept deliberately small: two env vars and one helper, no config-struct plumbing, matching how pairing_relay_url and icon already reach this function.

Testing

relay_name_and_description_come_from_env_and_ignore_blanks covers unset (defaults), set-and-trimmed, and blank-falls-back.

The test was verified to have teeth by mutating the fix back to the hardcoded string and confirming it fails:

test nip11::tests::relay_name_and_description_come_from_env_and_ignore_blanks ... FAILED
assertion `left == right` failed

Restored, the full nip11 module passes:

test result: ok. 17 passed; 0 failed

cargo fmt --check and cargo clippy -p buzz-relay --lib are clean.

Notes

Happy to move this into Config instead if you'd prefer the values to travel with the rest of the relay configuration — this shape just mirrors what the surrounding code already does.

A self-hosted relay is a distinct workspace to the people using it, but every
instance introduces itself as "Buzz Relay" — the product's name, not the
operator's. Clients surface this string, so an operator has no way to make their
own deployment read as theirs. The Desktop's community Name field only writes to
local storage, so it does not close the gap either.

Adds RELAY_NAME and RELAY_DESCRIPTION, defaulting to the current strings so no
existing deployment moves. Blank or whitespace-only values fall back to the
default rather than advertising an empty name.

Test covers unset, set-and-trimmed, and blank. Verified to have teeth by
mutating the fix back to the hardcoded string and confirming it fails.

Signed-off-by: André Pacheco <andre@cofoundy.dev>
@A-PachecoT
A-PachecoT requested a review from a team as a code owner August 26, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant