From 77567306e2f0606f19866e754e0b6f4382bb4d33 Mon Sep 17 00:00:00 2001 From: wuyueyang Date: Thu, 7 Jul 2022 20:51:28 +0800 Subject: [PATCH] Drop the status when a SIGNAL_KEY message is received --- .../Services/WebSocket/Service/ReceiveMessageService.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MixinServices/MixinServices/Services/WebSocket/Service/ReceiveMessageService.swift b/MixinServices/MixinServices/Services/WebSocket/Service/ReceiveMessageService.swift index 8f90e2bd1f..f1e869e866 100644 --- a/MixinServices/MixinServices/Services/WebSocket/Service/ReceiveMessageService.swift +++ b/MixinServices/MixinServices/Services/WebSocket/Service/ReceiveMessageService.swift @@ -488,6 +488,10 @@ public class ReceiveMessageService: MixinService { ] NotificationCenter.default.post(name: Self.senderKeyDidChangeNotification, object: self, userInfo: userInfo) } + self.updatePendingMessageStatuses { [id = data.messageId] statuses in + statuses[id] = nil + Logger.general.debug(category: "ReceiveMessageService", message: "Dropped status for signalkey message: \(id)") + } } }) let status = RatchetSenderKeyDAO.shared.getRatchetSenderKeyStatus(groupId: data.conversationId, senderId: data.userId, sessionId: data.sessionId)