fix: Add correct thread message_id to the email message (#1659)
Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
@@ -7,7 +7,7 @@ class ConversationReplyEmailWorker
|
||||
@conversation = Conversation.find(conversation_id)
|
||||
|
||||
# send the email
|
||||
if @conversation.messages.incoming&.last&.content_type == 'incoming_email'
|
||||
if @conversation.messages.incoming&.last&.content_type == 'incoming_email' || email_inbox?
|
||||
ConversationReplyMailer.reply_without_summary(@conversation, queued_time).deliver_later
|
||||
else
|
||||
ConversationReplyMailer.reply_with_summary(@conversation, queued_time).deliver_later
|
||||
@@ -19,6 +19,10 @@ class ConversationReplyEmailWorker
|
||||
|
||||
private
|
||||
|
||||
def email_inbox?
|
||||
@conversation.inbox&.inbox_type == 'Email'
|
||||
end
|
||||
|
||||
def conversation_mail_key
|
||||
format(::Redis::Alfred::CONVERSATION_MAILER_KEY, conversation_id: @conversation.id)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user