Fix: fixing mail to and in_reply_to issues (#3451)
This commit is contained in:
@@ -26,7 +26,11 @@ class ReplyMailbox < ApplicationMailbox
|
||||
end
|
||||
|
||||
def conversation_uuid_from_to_address
|
||||
mail.to.each do |email|
|
||||
@mail = MailPresenter.new(mail)
|
||||
|
||||
return if @mail.mail_receiver.blank?
|
||||
|
||||
@mail.mail_receiver.each do |email|
|
||||
username = email.split('@')[0]
|
||||
match_result = username.match(ApplicationMailbox::REPLY_EMAIL_UUID_PATTERN)
|
||||
if match_result
|
||||
@@ -37,10 +41,6 @@ class ReplyMailbox < ApplicationMailbox
|
||||
@conversation_uuid
|
||||
end
|
||||
|
||||
def verify_decoded_params
|
||||
raise 'Conversation uuid not found' if conversation_uuid.nil?
|
||||
end
|
||||
|
||||
# find conversation uuid from below pattern
|
||||
# reply+<conversation-uuid>@<mailer-domain.com>
|
||||
def find_conversation_with_uuid
|
||||
@@ -73,6 +73,10 @@ class ReplyMailbox < ApplicationMailbox
|
||||
end
|
||||
end
|
||||
|
||||
def verify_decoded_params
|
||||
raise 'Conversation uuid not found' if conversation_uuid.nil?
|
||||
end
|
||||
|
||||
def validate_resource(resource)
|
||||
raise "#{resource.class.name} not found" if resource.nil?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user