fix: undefined method contact in support mailbox (#2678)
if chatwoot receives an email of already existing contact with a different case say "Care@example.com", before this fix, it will throw an error. Now it will retrieve existing contact Fixes: #2553 Co-authored-by: Sojan Jose <sojan@pepalo.com>
This commit is contained in:
@@ -77,6 +77,11 @@ class MailPresenter < SimpleDelegator
|
||||
}
|
||||
end
|
||||
|
||||
def from
|
||||
# changing to downcase to avoid case mismatch while finding contact
|
||||
@mail.from.map(&:downcase)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# forcing the encoding of the content to UTF-8 so as to be compatible with database and serializers
|
||||
|
||||
Reference in New Issue
Block a user