fix(whatsapp): ack reaction logic for group activation 'always' mode

- Fix bug where ack reaction was not sent when group activation is 'always'
- When requireMention=false (activation: always), always send reaction
- Add test case for activation='always' scenario
- Update inline comments for clarity
This commit is contained in:
sheeek
2026-01-09 18:02:33 +01:00
committed by Peter Steinberger
parent b3b507c6ea
commit c3587d6cae
2 changed files with 52 additions and 5 deletions

View File

@@ -1405,7 +1405,9 @@ export async function monitorWebProvider(
conversationId,
});
const requireMention = activation !== "always";
if (!requireMention) return false;
// If mention is not required (activation === "always"), always react
if (!requireMention) return true;
// Otherwise, only react if bot was mentioned
return msg.wasMentioned === true;
}
return false;