Skip to content

fix(buzz-cli): p-tag DM recipients on messages send - #4738

Open
rithvikshettyy wants to merge 2 commits into
block:mainfrom
rithvikshettyy:fix/buzz-cli-dm-p-tag
Open

fix(buzz-cli): p-tag DM recipients on messages send#4738
rithvikshettyy wants to merge 2 commits into
block:mainfrom
rithvikshettyy:fix/buzz-cli-dm-p-tag

Conversation

@rithvikshettyy

@rithvikshettyy rithvikshettyy commented Aug 4, 2026

Copy link
Copy Markdown

Summary

  • buzz messages send --channel <dm-id> only p-tagged explicit @mentions, so a plain DM message carried no p tag at all — the recipient's dms list never showed the conversation, and p-tag-based classification (e.g. an agent gateway distinguishing DMs from broadcasts) misclassified CLI-originated DMs. Desktop already p-tags DM sends unconditionally.
  • cmd_send_message now looks up the channel's kind:41001 DM record (#d=<channel_id>) for kind-9/default sends and auto-adds the other participant(s) as p tags, deduped against existing mentions and excluding our own pubkey. Skipped for forum kinds (45001/45003), which can't target a DM.

Test plan

  • cargo test -p buzz-cli — 318 passed, 0 failed, including new dm_participants_are_added_excluding_self_and_duplicates
  • cargo fmt -p buzz-cli -- --check
  • cargo clippy -p buzz-cli --all-targets --all-features -- -D warnings — clean
  • Manual: buzz dms open --pubkey <b> as A, buzz messages send --channel <dm-id> --content "hi" (no @mention), confirm B's buzz dms list shows the conversation and the event carries ["p", "<A>"] — not run against a live relay from this environment

Fixes #4704

cmd_send_message only emitted p tags for explicit @mentions, so a
plain DM message (no @mention in content) carried none. Desktop
p-tags DM sends unconditionally; the CLI now matches by looking up
the channel's kind:41001 DM record and auto-tagging the other
participant(s) when sending a kind-9/default message.

Fixes block#4704

Signed-off-by: rithvik shetty <rithvikshetty2004@gmail.com>
@rithvikshettyy
rithvikshettyy requested a review from a team as a code owner August 4, 2026 16:01
Signed-off-by: rithvik shetty <rithvikshetty2004@gmail.com>
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-cli: dms open + messages send do not p-tag the recipient; dms list then misses the conversation

1 participant