From 491ca58e9d2f0115d28f61be66dab6e1e96e442e Mon Sep 17 00:00:00 2001 From: ryanzhao Date: Tue, 6 Dec 2022 13:11:33 +1100 Subject: [PATCH] fix an issue where the info message won't disappearing if it is from expiration timer update message --- .../Message Handling/MessageReceiver+ExpirationTimers.swift | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/SessionMessagingKit/Sending & Receiving/Message Handling/MessageReceiver+ExpirationTimers.swift b/SessionMessagingKit/Sending & Receiving/Message Handling/MessageReceiver+ExpirationTimers.swift index 9b88c0d45..14db6f348 100644 --- a/SessionMessagingKit/Sending & Receiving/Message Handling/MessageReceiver+ExpirationTimers.swift +++ b/SessionMessagingKit/Sending & Receiving/Message Handling/MessageReceiver+ExpirationTimers.swift @@ -45,6 +45,8 @@ extension MessageReceiver { type: defaultType ) + try config.save(db) + // Add an info message for the user _ = try Interaction( serverHash: nil, // Intentionally null so sync messages are seen as duplicates @@ -60,9 +62,5 @@ extension MessageReceiver { ), timestampMs: Int64(message.sentTimestamp ?? 0) // Default to `0` if not set ).inserted(db) - - // Finally save the changes to the DisappearingMessagesConfiguration (If it's a duplicate - // then the interaction unique constraint will prevent the code from getting here) - try config.save(db) } }