Description
When a user quotes/replies to a message in a WhatsApp group chat and tags Clawdis, the bot cannot see the content of the quoted message. Only the user's reply text is extracted.
Steps to Reproduce
User A sends a message: "What's the weather in Tokyo?"
User B quotes that message and adds "@clawdis summarize this"
Clawdis only sees "@clawdis summarize this" - not the quoted message content
Expected Behavior
Clawdis should see:
[Quoted: "What's the weather in Tokyo?"]
@clawdis summarize this
Root Cause
The extractText() function in src/web/inbound.ts extracts text from:
message.conversation
message.extendedTextMessage.text
message.imageMessage.caption / message.videoMessage.caption
But it does not extract message.extendedTextMessage.contextInfo.quotedMessage.
Proposed Fix
Modify extractText() to check for contextInfo.quotedMessage and prepend its text content with a [Quoted: "..."] prefix.
Description
When a user quotes/replies to a message in a WhatsApp group chat and tags Clawdis, the bot cannot see the content of the quoted message. Only the user's reply text is extracted.
Steps to Reproduce
User A sends a message: "What's the weather in Tokyo?"
User B quotes that message and adds "@clawdis summarize this"
Clawdis only sees "@clawdis summarize this" - not the quoted message content
Expected Behavior
Clawdis should see:
[Quoted: "What's the weather in Tokyo?"]
@clawdis summarize this
Root Cause
The extractText() function in src/web/inbound.ts extracts text from:
message.conversation
message.extendedTextMessage.text
message.imageMessage.caption / message.videoMessage.caption
But it does not extract message.extendedTextMessage.contextInfo.quotedMessage.
Proposed Fix
Modify extractText() to check for contextInfo.quotedMessage and prepend its text content with a [Quoted: "..."] prefix.