mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-19 19:18:27 +00:00
fix cancel notification
This commit is contained in:
parent
f10ddb8e3a
commit
feff1c8393
@ -156,14 +156,14 @@ fun MessageReceiver.handleUnsendRequest(message: UnsendRequest) {
|
||||
val timestamp = message.timestamp ?: return
|
||||
val author = message.author ?: return
|
||||
val messageIdToDelete = storage.getMessageIdInDatabase(timestamp, author) ?: return
|
||||
if (!messageDataProvider.isOutgoingMessage(messageIdToDelete)) {
|
||||
// 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))
|
||||
}
|
||||
messageDataProvider.updateMessageAsDeleted(timestamp, author)
|
||||
if (!messageDataProvider.isOutgoingMessage(messageIdToDelete)) {
|
||||
// FIXME: Not sure if there is any performance issue here
|
||||
SSKEnvironment.shared.notificationManager.updateNotification(context)
|
||||
}
|
||||
}
|
||||
//endregion
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user