Skip to content

fix(send): DM-parse error hints at recovery (closes #147) - #252

Merged
joelteply merged 1 commit into
canaryfrom
fix/dm-parse-error-hints-recovery
Apr 28, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/dm-parse-error-hints-recovery

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Empty-body-after-@-target error now lists the three recovery shapes including the in-channel @-mention case (root of #141).

Old error was just 'Usage: airc send @peer <message>' — true but
unhelpful for the most common cause (#141): user wanted an in-channel
@-mention, not a DM, and got an unhelpful usage line.

New error spells out three recovery paths:

  airc msg @peer <message>           DM that peer
  airc msg @Peer1 @peer2 <message>   DM multiple peers
  airc msg "hi @peer, fyi"           in-channel @-mention (quote so @ stays in body)

ERROR: got @-targets but no message body. If you wanted an @-mention
       in the channel, quote the whole message.

Verification: tabs 19/0; manual exercise of empty-body case.
Copilot AI review requested due to automatic review settings April 28, 2026 23:02
@joelteply
joelteply merged commit 5285bcd into canary Apr 28, 2026
@joelteply
joelteply deleted the fix/dm-parse-error-hints-recovery branch April 28, 2026 23:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates cmd_send’s empty-message-after-@peer error to provide clearer recovery guidance when users accidentally trigger DM parsing while intending an in-channel @mention (issue #141), closing #147.

Changes:

  • Replaces the single-line usage error for “DM targets but empty body” with a multi-line Usage block plus a more descriptive error.
  • Adds an example intended to clarify how to do an in-channel @mention without triggering DM parsing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/airc_bash/cmd_send.sh
Comment on lines +135 to +138
echo " airc msg @peer <message> DM that peer" >&2
echo " airc msg @peer1 @peer2 <message> DM multiple peers" >&2
echo " airc msg \"hi @peer, fyi\" in-channel @-mention (quote so @ stays in body)" >&2
die "got @-targets but no message body. If you wanted an @-mention in the channel, quote the whole message."
Comment thread lib/airc_bash/cmd_send.sh
Comment on lines +132 to +133
# wanting an in-channel @-mention rather than a DM (#141). Two
# explicit recovery paths instead of just the bare usage line.
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.

2 participants