Description
When a user replies to (quotes) a message inside a bot thread using Discord's reply function, the bot only receives the new message text. The quoted/referenced message content is lost — the agent has no idea what "this" refers to.
Current Behavior
- User quotes an earlier message and types "summarize this"
- OpenAB sends only "summarize this" to the ACP agent
- Agent has no context about what was quoted
Expected Behavior
- When
msg.referenced_message is present, OpenAB should fetch the referenced message content and prepend it to the prompt (or include it as a separate context block)
- Example prompt sent to agent:
[Quoted message from @user]:
<content of the quoted message>
summarize this
Implementation Notes
- Discord's
Message struct has message_reference and referenced_message fields
referenced_message is often populated by the gateway, but may need a fallback API call via channel_id.message(http, message_id)
- This is especially useful for multi-agent collaboration where a user quotes a bot's response to ask another bot about it
- Should work for both in-thread replies and channel-level replies that trigger thread creation
Description
When a user replies to (quotes) a message inside a bot thread using Discord's reply function, the bot only receives the new message text. The quoted/referenced message content is lost — the agent has no idea what "this" refers to.
Current Behavior
Expected Behavior
msg.referenced_messageis present, OpenAB should fetch the referenced message content and prepend it to the prompt (or include it as a separate context block)Implementation Notes
Messagestruct hasmessage_referenceandreferenced_messagefieldsreferenced_messageis often populated by the gateway, but may need a fallback API call viachannel_id.message(http, message_id)