From 5dc888c573cb5393e094e67db1c6aa69053cd5f0 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Thu, 30 Oct 2025 16:24:20 +0530 Subject: [PATCH] feat: check for references if there's no conversation --- app/mailboxes/reply_mailbox.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/mailboxes/reply_mailbox.rb b/app/mailboxes/reply_mailbox.rb index 7acd441ba..9891c951e 100644 --- a/app/mailboxes/reply_mailbox.rb +++ b/app/mailboxes/reply_mailbox.rb @@ -21,10 +21,10 @@ class ReplyMailbox < ApplicationMailbox def find_relative_conversation if @conversation_uuid find_conversation_with_uuid - elsif mail.in_reply_to.present? - find_conversation_with_in_reply_to - elsif mail.references.present? - find_conversation_with_references + elsif mail.in_reply_to.present? || mail.references.present? + find_conversation_with_in_reply_to if mail.in_reply_to.present? + # If still no conversation found and references exist, try references as fallback + find_conversation_with_references if @conversation.blank? && mail.references.present? end end