From f10ddb8e3a7cdc79f36b99aa8e93eb5d237231ce Mon Sep 17 00:00:00 2001 From: ryanzhao Date: Mon, 16 Aug 2021 10:34:28 +1000 Subject: [PATCH] cancel notification for unsend request --- .../messaging/sending_receiving/ReceivedMessageHandler.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/ReceivedMessageHandler.kt b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/ReceivedMessageHandler.kt index 1d5a797b77..82ac2139d2 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/ReceivedMessageHandler.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/ReceivedMessageHandler.kt @@ -157,7 +157,8 @@ fun MessageReceiver.handleUnsendRequest(message: UnsendRequest) { val author = message.author ?: return val messageIdToDelete = storage.getMessageIdInDatabase(timestamp, author) ?: return if (!messageDataProvider.isOutgoingMessage(messageIdToDelete)) { - // TODO: Cancel the notification of this message + // FIXME: Not sure if there is any performance issue here + SSKEnvironment.shared.notificationManager.updateNotification(context) } messageDataProvider.getServerHashForMessage(messageIdToDelete)?.let { serverHash -> SnodeAPI.deleteMessage(author, listOf(serverHash))