From a1dc03c9584de9fb8ac2751338ad96c3392f8ebc Mon Sep 17 00:00:00 2001 From: rhunk <101876869+rhunk@users.noreply.github.com> Date: Fri, 3 Jan 2025 01:08:56 +0100 Subject: [PATCH] fix(core/notifications): resume coroutine Signed-off-by: rhunk <101876869+rhunk@users.noreply.github.com> --- .../snapenhance/core/features/impl/messaging/Notifications.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/messaging/Notifications.kt b/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/messaging/Notifications.kt index 88c50c74..a0fc3b60 100644 --- a/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/messaging/Notifications.kt +++ b/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/messaging/Notifications.kt @@ -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 = {