You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Treat a quote-reply with a direct Hermes mention as a new task in a thread-first channel.
Treat Discord's automatic reply-ping as context, not as a typed invocation.
Add a regression at the Discord free-response boundary that proves the emitted Hermes event targets the newly created thread, not the parent channel.
Why
The merged #11629 fix excluded every quote-reply from auto-threading to protect free-response continuations. That broad exclusion also routed an explicit @Hermes task reply into the parent channel. A direct mention is already Hermes' explicit invocation signal; this change makes that case follow the configured auto-thread route while retaining the unmentioned continuation behaviour. The adapter captures the raw <@Hermes> token before it strips display text: Discord can add the replied-to bot to message.mentions automatically, but that reply-ping alone must not create a new thread. The raw-token check runs only for reply messages, avoiding an unnecessary scan on ordinary Discord traffic.
This is intentionally narrower than #80658, which routes all eligible quote-replies through a thread and would change #9399's unmentioned free-response behaviour.
AI code review — automated review for reference; please use your judgment.
The distinction drawn here is exactly right: a raw <@bot> token typed inside a quote-reply is a deliberate invocation (→ new thread), while a mention that materializes only through Discord's automatic reply-ping resolution is ambient context (→ stays inline). Hoisting is_reply_message/inline_mention above the display-stripping step is necessary for the raw-token check to see unmodified content, the guard ordering keeps no_thread_channels and voice-linked channels winning over the new behavior, and both directions have focused regression tests with honest docstrings.
No blocking issues found.
Nit (plugins/platforms/discord/adapter.py:~8168–8172): skip_for_reply reads as a double negative in the condition (not skip_for_reply) and inline_mention actually means "raw-token mention within a reply"; renaming to e.g. reply_without_direct_mention / reply_has_raw_mention would make this branch self-documenting for the next reader.
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
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.
Summary
Why
The merged #11629 fix excluded every quote-reply from auto-threading to protect free-response continuations. That broad exclusion also routed an explicit
@Hermestask reply into the parent channel. A direct mention is already Hermes' explicit invocation signal; this change makes that case follow the configured auto-thread route while retaining the unmentioned continuation behaviour. The adapter captures the raw<@Hermes>token before it strips display text: Discord can add the replied-to bot tomessage.mentionsautomatically, but that reply-ping alone must not create a new thread. The raw-token check runs only for reply messages, avoiding an unnecessary scan on ordinary Discord traffic.This is intentionally narrower than #80658, which routes all eligible quote-replies through a thread and would change #9399's unmentioned free-response behaviour.
Test plan
All commands passed on the current
mainbase (8794e5a…): 35 focused tests, Ruff on both changed files, and the Windows-footgun scan (994 files).