Skip to content

Commit

Permalink
fix: Visitor message not being sent to webhook (#30933)
Browse files Browse the repository at this point in the history
Co-authored-by: Kevin Aleman <11577696+KevLehman@users.noreply.github.com>
  • Loading branch information
ldebowczyk and KevLehman committed Nov 20, 2023
1 parent 50ab48c commit 6000b63
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/loud-foxes-grin.md
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

fix: Visitor message not being sent to webhook due to wrong validation of settings
2 changes: 1 addition & 1 deletion apps/meteor/app/livechat/server/hooks/sendToCRM.ts
Expand Up @@ -269,7 +269,7 @@ callbacks.add(
if (message.token && !settings.get('Livechat_webhook_on_visitor_message')) {
return message;
}
if (!settings.get('Livechat_webhook_on_agent_message')) {
if (!message.token && !settings.get('Livechat_webhook_on_agent_message')) {
return message;
}
// if the message has a type means it is a special message (like the closing comment), so skips
Expand Down

0 comments on commit 6000b63

Please sign in to comment.