diff --git a/src/main/kotlin/com/cubetiqs/messaging/client/telegram/TelegramProvider.kt b/src/main/kotlin/com/cubetiqs/messaging/client/telegram/TelegramProvider.kt index 24bbd94..1e553f2 100644 --- a/src/main/kotlin/com/cubetiqs/messaging/client/telegram/TelegramProvider.kt +++ b/src/main/kotlin/com/cubetiqs/messaging/client/telegram/TelegramProvider.kt @@ -77,9 +77,13 @@ class TelegramProvider : MessageProvider, Loggable { ) } - TelegramResponse( - response = response, - ) + if (response != null) { + TelegramResponse( + response = response, + ) + } else { + null + } } catch (ex: Exception) { log.error("[Telegram] Message send error: ${ex.message}!") null