From 99534517677cf190612863db1124fba08a36bd33 Mon Sep 17 00:00:00 2001 From: ryanzhao Date: Wed, 4 Aug 2021 14:53:16 +1000 Subject: [PATCH] add comment --- SessionMessagingKit/Sending & Receiving/MessageSender.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SessionMessagingKit/Sending & Receiving/MessageSender.swift b/SessionMessagingKit/Sending & Receiving/MessageSender.swift index c34c9dde8..72760184f 100644 --- a/SessionMessagingKit/Sending & Receiving/MessageSender.swift +++ b/SessionMessagingKit/Sending & Receiving/MessageSender.swift @@ -332,6 +332,9 @@ public final class MessageSender : NSObject { Storage.shared.addReceivedMessageTimestamp(message.sentTimestamp!, using: transaction) // Get the visible message if possible if let tsMessage = TSOutgoingMessage.find(withTimestamp: message.sentTimestamp!) { + // When the sync message is successfully sent, the hash value of this TSOutgoingMessage + // will be replaced by the hash value of the sync message. Since the hash value of the + // real message has no use when we delete a message. It is OK to let it be. tsMessage.serverHash = message.serverHash // Track the open group server message ID tsMessage.openGroupServerMessageID = message.openGroupServerMessageID ?? 0