chore: Enable email channel (#1851)

This commit is contained in:
Sojan Jose
2021-03-04 13:59:59 +05:30
committed by GitHub
parent 6aed01de0c
commit ca4a766b82
15 changed files with 54 additions and 48 deletions

View File

@@ -19,7 +19,7 @@ class SupportMailbox < ApplicationMailbox
def find_channel
mail.to.each do |email|
@channel = Channel::Email.find_by(email: email)
@channel = Channel::Email.find_by('email = ? OR forward_to_email = ?', email, email)
break if @channel.present?
end
raise 'Email channel/inbox not found' if @channel.nil?