Skip to content

fix(discord): fetch and inject reply context for incoming messages#31447

Closed
alaamohanad169-ship-it wants to merge 1 commit into
NousResearch:mainfrom
alaamohanad169-ship-it:fix/discord-reply-v4
Closed

fix(discord): fetch and inject reply context for incoming messages#31447
alaamohanad169-ship-it wants to merge 1 commit into
NousResearch:mainfrom
alaamohanad169-ship-it:fix/discord-reply-v4

Conversation

@alaamohanad169-ship-it

Copy link
Copy Markdown
Contributor

Summary

When a user replies to a message in Discord, Hermes now fetches the referenced message content via API when Discord does not provide it inline (common for older/high-traffic messages), and prepends reply context to the message text so the agent understands what the user is responding to.

Changes

  • plugins/platforms/discord/adapter.py — 14 lines added:
    • Fetch message via API when resolved is None
    • Prepend [Replying to: "..."] context to event text

Fixes #30049

@alaamohanad169-ship-it

Copy link
Copy Markdown
Contributor Author

Clean PR on latest main. Fetches reply-to message from Discord API when not provided inline, prepends [Replying to: "..."] context. Previous versions had file path issues (discord.py moved to plugins/). This version correctly modifies plugins/platforms/discord/adapter.py. +14 -0.

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/plugins Plugin system and bundled plugins platform/discord Discord bot adapter labels May 24, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #30950 (closed, same author). This is the 4th resubmission of the same Discord reply-context fix (also #30085, #31438, #31440, #31432). Competing with open #5348 which takes a TTL cache approach. Fixes #30049.

@alaamohanad169-ship-it

Copy link
Copy Markdown
Contributor Author

Closed — replaced by a clean rebased PR. The original branch had accumulated unintended diff pollution from a bad rebase. The new PR contains only the focused fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins duplicate This issue or pull request already exists P2 Medium — degraded but workaround exists platform/discord Discord bot adapter type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(gateway): resolve replied/quoted message context in Discord and WhatsApp

2 participants