cancel notification for unsend request

This commit is contained in:
ryanzhao 2021-08-16 10:34:28 +10:00
parent ee3e9ae17f
commit f10ddb8e3a
1 changed files with 2 additions and 1 deletions

View File

@ -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))