From 9a394acc301fd9c21a8aa81f5b0de2562c805a86 Mon Sep 17 00:00:00 2001 From: Ioan Moldovan Date: Mon, 4 Aug 2025 02:45:01 -0700 Subject: [PATCH] fix: sending a secure reply using the created draft produces a new thread issue --- .../Mail Provider/Message Provider/Gmail+Message.swift | 5 ++++- .../Message Provider/Gmail+MessageExtension.swift | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/FlowCrypt/Functionality/Mail Provider/Message Provider/Gmail+Message.swift b/FlowCrypt/Functionality/Mail Provider/Message Provider/Gmail+Message.swift index 25a6273de..37723720d 100644 --- a/FlowCrypt/Functionality/Mail Provider/Message Provider/Gmail+Message.swift +++ b/FlowCrypt/Functionality/Mail Provider/Message Provider/Gmail+Message.swift @@ -21,7 +21,10 @@ extension GmailService: MessageProvider { let query = createMessageQuery(identifier: identifier, format: kGTLRGmailFormatFull) return try await withCheckedThrowingContinuation { continuation in - self.gmailService.executeQuery(query) { _, data, error in + self.gmailService.executeQuery(query) { + _, + data, + error in if let error { return continuation.resume(throwing: GmailApiError.providerError(error)) } diff --git a/FlowCrypt/Functionality/Mail Provider/Message Provider/Gmail+MessageExtension.swift b/FlowCrypt/Functionality/Mail Provider/Message Provider/Gmail+MessageExtension.swift index cd8124404..a00119696 100644 --- a/FlowCrypt/Functionality/Mail Provider/Message Provider/Gmail+MessageExtension.swift +++ b/FlowCrypt/Functionality/Mail Provider/Message Provider/Gmail+MessageExtension.swift @@ -44,6 +44,7 @@ extension Message { var replyTo: String? var inReplyTo: String? var rfc822MsgId: String? + var replyToMsgId: String? var isSuspicious = false for messageHeader in messageHeaders.compactMap({ $0 }) { @@ -58,7 +59,9 @@ extension Message { case .cc: cc = value case .bcc: bcc = value case .replyTo: replyTo = value - case .inReplyTo: inReplyTo = value + case .inReplyTo: + inReplyTo = value + replyToMsgId = value case .receivedSPF: isSuspicious = value.contains("softfail") case .identifier: rfc822MsgId = value default: break @@ -84,6 +87,7 @@ extension Message { bcc: bcc, replyTo: replyTo, inReplyTo: inReplyTo, + replyToMsgId: replyToMsgId, isSuspicious: isSuspicious ) }