From 963d33a452d85094a4a758b1d84e3858fb8e739d Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Fri, 16 Sep 2022 21:18:22 +0600 Subject: [PATCH] small hotfix --- posts/panel/src/jvmMain/kotlin/Plugin.kt | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/posts/panel/src/jvmMain/kotlin/Plugin.kt b/posts/panel/src/jvmMain/kotlin/Plugin.kt index e38219a..6adaedd 100644 --- a/posts/panel/src/jvmMain/kotlin/Plugin.kt +++ b/posts/panel/src/jvmMain/kotlin/Plugin.kt @@ -1,6 +1,7 @@ package dev.inmo.plaguposter.posts.panel import com.benasher44.uuid.uuid4 +import dev.inmo.micro_utils.coroutines.runCatchingSafely import dev.inmo.micro_utils.coroutines.subscribeSafelyWithoutExceptions import dev.inmo.micro_utils.koin.getAllDistinct import dev.inmo.micro_utils.repos.deleteById @@ -168,11 +169,13 @@ object Plugin : Plugin { val postId = query.data.removePrefix("refresh ").let(::PostId) val (chatId, messageId) = postsMessages.get(postId) ?: return@onMessageDataCallbackQuery - refreshPostMessage( - postId, - chatId, - messageId - ) + runCatchingSafely { + refreshPostMessage( + postId, + chatId, + messageId + ) + } answer(query) }