Skip to content

send_message: verify thread matches target profile, fall back to compose#18

Merged
huangruoqi merged 7 commits into
mainfrom
issue-13-send-message
Jul 6, 2026
Merged

send_message: verify thread matches target profile, fall back to compose#18
huangruoqi merged 7 commits into
mainfrom
issue-13-send-message

Conversation

@huangruoqi

@huangruoqi huangruoqi commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Thread search now prefers a result matching profile hints instead of blindly taking the first visible row
  • After opening a thread, verifies the header name and the resolved profile-link URL against the target profile before sending — aborts on mismatch instead of risking a message to the wrong person
  • send_message now falls back to the "Compose a new message" typeahead when a connection has no existing thread anywhere (e.g. accepted without a note) — matches the recipient by name and adds them
  • New-conversation drafts (.../messaging/thread/new/) have no persisted thread id, so their title bar just reads "New message" — verification now checks the conversation's profile card first, which carries the recipient's name and an already-resolved vanity-slug link (no click-and-navigate needed there)
  • Adds testing/tools/send_message.py, a manual live tool for sending a real DM through this flow
  • Bumps version to 1.0.0.9 and updates CHANGELOG

Test plan

  • testing/tests/test_send_message_thread_match.py covers header-match, profile-URL-match, and compose-fallback cases (including a same-name-wrong-person scenario caught by the resolved URL)
  • testing/tools/check_thread_match.py / testing/tools/send_message.py manual check tools

🤖 Generated with Claude Code

huangruoqi and others added 7 commits July 5, 2026 22:10
Documents the thread-match verification added for send_message (header + profile-URL checks) to prevent messaging the wrong recipient.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Documents the compose-fallback fix for send_message when a connection has no existing thread yet.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@huangruoqi huangruoqi changed the title send_message: verify opened thread matches target profile send_message: verify thread matches target profile, fall back to compose Jul 6, 2026
@huangruoqi huangruoqi merged commit 942c2a8 into main Jul 6, 2026
2 checks passed
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