From c8966b5505cf101fce131e0feb1ee01c009a0b60 Mon Sep 17 00:00:00 2001 From: tomastiminskas Date: Fri, 10 Apr 2026 14:59:52 +0000 Subject: [PATCH] Generated with Hive: Fix replyUUID loss in message send and confirmation pipeline on iOS --- sphinx/Crypter/SphinxOnionManager+ChatExtension.swift | 9 +++++++++ ...wChatViewController+BottomViewDelegateExtension.swift | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/sphinx/Crypter/SphinxOnionManager+ChatExtension.swift b/sphinx/Crypter/SphinxOnionManager+ChatExtension.swift index ed95e57c..36109e6a 100644 --- a/sphinx/Crypter/SphinxOnionManager+ChatExtension.swift +++ b/sphinx/Crypter/SphinxOnionManager+ChatExtension.swift @@ -521,6 +521,15 @@ extension SphinxOnionManager { // assignReceiverId(localMsg: localMsg) // localMsg.managedObjectContext?.saveContext() + // Preserve replyUUID from inner content if the local message doesn't already have one + if localMsg.replyUUID == nil, + let msg = message.message, + let innerContent = MessageInnerContent(JSONString: msg), + let replyUuid = innerContent.replyUuid + { + localMsg.replyUUID = replyUuid + } + return localMsg } diff --git a/sphinx/Scenes/Chat/View Controllers/New Chat View Controller/New Chat View Controller/NewChatViewController+BottomViewDelegateExtension.swift b/sphinx/Scenes/Chat/View Controllers/New Chat View Controller/New Chat View Controller/NewChatViewController+BottomViewDelegateExtension.swift index 5a295dc1..6fa450f4 100644 --- a/sphinx/Scenes/Chat/View Controllers/New Chat View Controller/New Chat View Controller/NewChatViewController+BottomViewDelegateExtension.swift +++ b/sphinx/Scenes/Chat/View Controllers/New Chat View Controller/New Chat View Controller/NewChatViewController+BottomViewDelegateExtension.swift @@ -86,7 +86,7 @@ extension NewChatViewController : ChatMessageTextFieldViewDelegate { text: text, sendingAttachment: sendingAttachment, threadUUID: self.chatViewModel.replyingTo?.uuid, - replyUUID: self.threadUUID ?? self.chatViewModel.replyingTo?.replyUUID, + replyUUID: self.threadUUID ?? self.chatViewModel.replyingTo?.uuid, metaDataString: chat?.getMetaDataJsonStringValue(forceIncludeTimezone: self.chatViewModel.wasTimezoneNotSentRecently()) )