chore: Prevent notification email loop (#3386)

Configuring an agent email also as a support email inbox leads to conversations getting created in a loop if notifications were also configured to the same email.
This commit is contained in:
Sojan Jose
2021-11-15 19:15:51 +05:30
committed by GitHub
parent e849759e15
commit acb06e7df6
4 changed files with 190 additions and 0 deletions

View File

@@ -7,6 +7,9 @@ class SupportMailbox < ApplicationMailbox
:decorate_mail
def process
# prevent loop from chatwoot notification emails
return if notification_email_from_chatwoot?
ActiveRecord::Base.transaction do
find_or_create_contact
find_or_create_conversation