buzz
buzz copied to clipboard
fix(relay): emit participant-addressed DM discovery
Summary
- emit the relay-confirmed kind:41001 event that buzz dms list already queries
- add d and h channel tags plus a p tag for every DM participant
- keep the event channel-scoped so the existing private-channel read gate applies
- emit on both create and re-open so older DMs self-heal
- emit from the add-member path that creates immutable group DMs
- use the channel creation timestamp so repeated opens produce one stable event id
Root cause
The CLI discovery contract existed, but the relay had no kind:41001 producer. The relay emitted kind:39000 channel metadata and membership notifications, so the conversation appeared in buzz channels list while buzz dms list always returned an empty result.
Verification
- extended the existing real-relay DM discovery test to query kind:41001 as both the creator and recipient
- adds a third identity through kind:41011 and proves the resulting group DM is discoverable by its new participant
- asserts all participant p tags, the d and h channel tags, and one event after a recipient re-open
- cargo fmt --all
- git diff --check
- fork CI: Rust lint, unit tests, security, Windows, both Linux cross-compiles, Backend Integration, and the full Relay E2E suite pass
The fork-only macOS desktop build fails before compiling Buzz because its mesh-llm checkout is unavailable. The same environment failure occurs on the unchanged mobile test branch and is unrelated to this relay diff.
Fixes #2897
The relay already knows every participant, so DM discovery should not end as “Return to Sender.”