Support reactions on chat messages - #63
Merged
Merged
Conversation
`message react` and `message unreact` hard-required `--team` and `--channel`,
so a message in a one-on-one or group chat could not be reacted to at all.
Both commands now accept `--chat` as an alternative, posting to the beta
`/chats/{id}/messages/{id}/setReaction` and `unsetReaction` endpoints, and
reject `--chat` combined with either half of the channel pair.
Graph expects a custom reaction as a unicode character rather than a name, so
a small table translates the names it does not recognise. The six names in the
original help text are deliberately absent from it: the service accepts those
verbatim and translating them would change channel behaviour that already
works. An emoji character supplied directly passes through untouched.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WaPzFH6fphPwRi2vrNLBuj
Making `--team` and `--channel` optional let an incomplete invocation parse, so `react` and `unreact` resolved credentials before noticing the missing target and exited 3 (auth) instead of 2 (invalid input). Clap now enforces the alternatives — `--team` requires `--channel` and each is required unless `--chat` is present — restoring the exit code and rejecting the command before any authentication happens. An overridden usage line keeps both forms visible in the error. README and the man page documented reactions as channel-only, so the chat and emoji forms existed nowhere but `--help`; both now describe them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WaPzFH6fphPwRi2vrNLBuj
… reactions Microsoft Graph documents setReaction/unsetReaction on v1.0 for channel and chat messages and requires the reaction as a unicode character; the legacy names (like, heart, laugh, surprised, sad, angry) are only returned on reads and are rejected on writes with HTTP 400 "Unicode 'like' in the payload is not supported". Verified against a live tenant. - Reaction endpoints move from beta to v1.0; the beta warning goes away. - The six classic names are translated to the characters Graph labels Like/Heart/Laugh/Surprised/Sad/Angry (👍 ❤️ 😆 😮 🙁 😠), alongside the existing aliases. Emoji characters still pass through untouched. - ChatMessage gains an optional `reactions` field so `message list` and `message get` show reactions. - Wiremock tests cover the POST contract, the 400 for a legacy name, and the 403 mapping; the endpoint builders are asserted to target v1.0. - README, teams(1), command reference, AGENTS.md and CHANGELOG updated. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
sionsmith
force-pushed
the
feat/chat-reactions
branch
from
August 19, 2026 07:43
b17c390 to
a035e8e
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #62.
message reactandmessage unreactaccept--chatas an alternative to the--team/--channelpair, posting to the beta/chats/{chatId}/messages/{messageId}/setReactionandunsetReactionendpoints. Clap enforces the alternation, so a mixed or incomplete target is rejected at parse time and still exits 2 before any authentication.Reaction names Graph does not recognise are translated to their unicode character:
eyesto 👀, plusthumbsup,thumbsdown,tada,rocket,fire. The six names in the existing help text are not in the table because Graph accepts them verbatim, so channel behaviour is unchanged. A reaction given as an emoji character passes through untouched.Tested against a live tenant 👍 — set and removed a reaction on a chat message, confirmed with
message list --chat. It reads back asreactionType: "👀",displayName: "Eyes".README and
teams(1)document the chat and emoji forms.cargo fmt,cargo clippy --all-targets -- -D warnings, andcargo test --all-targetspass (137 unit + 56 integration tests).🤖 Generated with Claude Code
https://claude.ai/code/session_01WaPzFH6fphPwRi2vrNLBuj