Skip to content

fix(cli): buzz dms list always returns empty - #5139

Open
deepmroot wants to merge 1 commit into
block:mainfrom
deepmroot:fix/dms-list-empty
Open

fix(cli): buzz dms list always returns empty#5139
deepmroot wants to merge 1 commit into
block:mainfrom
deepmroot:fix/dms-list-empty

Conversation

@deepmroot

Copy link
Copy Markdown

Summary

  • buzz dms list queried kind:41001 (KIND_DM_CREATED), but the relay's handle_dm_open never emits that kind — it's a registered kind with no publisher anywhere in the relay, so the query always returned [], even for active DMs with messages.
  • DM channels are regular NIP-29 channels (channel_type = "dm") that already emit discovery events: kind:39002 membership and kind:39000 metadata tagged ["t","dm"] with a p tag per participant (see emit_group_discovery_events in command_executor.rs).
  • Rewired cmd_list_dms to follow the same two-step discovery path as channels list --member: kind:39002 (my membership) → kind:39000 metadata for those channel ids → filter to ["t","dm"].

Fixes #5137.

Test plan

  • cargo build --release -p buzz-cli
  • cargo fmt -p buzz-cli -- --check
  • cargo clippy -p buzz-cli --all-targets -- -D warnings
  • Ran ./target/release/buzz.exe dms list against a live relay with an active DM that previously returned [] — now returns the DM with correct dm_id, participants, and created_at.

🤖 Generated with Claude Code

cmd_list_dms queried kind:41001 (KIND_DM_CREATED), but the relay's
handle_dm_open never emits that kind — it's defined in kind.rs and
registered as a known kind, but nothing publishes it. So dms list
returned [] for every DM, even active ones with messages.

DM channels are regular NIP-29 channels (channel_type = "dm") that do
get discovery events: kind:39002 membership and kind:39000 metadata
tagged ["t","dm"] with a "p" tag per participant. This mirrors the
existing channels list --member path (kind:39002 -> kind:39000) instead
of the dead kind:41001 query.

Verified against a live relay with an active DM that previously
returned [] via dms list.

Signed-off-by: Mandeep Singh <mandeepsinghwani@gmail.com>
@deepmroot
deepmroot requested a review from a team as a code owner August 7, 2026 02:17
@matthewdonsemail-lab

Copy link
Copy Markdown

@deepmroot make sure that it's formatted in the right way ask my agents in the buzz groupchat for InferenceSaver that it uses the Github Issues skill communicate with Inference Ops it'll tell you about the skill

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.

buzz dms list returns empty for an active DM conversation with messages

2 participants