fix(core/notifications): resume coroutine

Signed-off-by: rhunk <101876869+rhunk@users.noreply.github.com>
This commit is contained in:
rhunk 2025-01-03 01:08:56 +01:00
parent f69f08c4ed
commit a1dc03c958

View File

@ -486,13 +486,12 @@ class Notifications : Feature("Notifications") {
context.coroutineScope.launch(coroutineDispatcher) {
suspendCoroutine { continuation ->
conversationManager.fetchMessageByServerId(conversationId, serverMessageId.toLong(), onSuccess = {
continuation.resumeWith(Result.success(Unit))
if (it.senderId.toString() == context.database.myUserId) {
continuation.resumeWith(Result.success(Unit))
param.invokeOriginal()
return@fetchMessageByServerId
}
context.coroutineScope.launch(coroutineDispatcher) {
continuation.resumeWith(Result.success(Unit))
onMessageReceived(notificationData, notificationType, it)
}
}, onError = {