mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-03 07:09:23 +00:00
InvalidPhotoDimensionsException
This commit is contained in:
@@ -14,6 +14,7 @@ fun newRequestException(
|
||||
description == "Bad Request: message to edit not found" -> MessageToEditNotFoundException(response, plainAnswer, message, cause)
|
||||
description.contains("Bad Request: message is not modified") -> MessageIsNotModifiedException(response, plainAnswer, message, cause)
|
||||
description == "Unauthorized" -> UnauthorizedException(response, plainAnswer, message, cause)
|
||||
description.contains("PHOTO_INVALID_DIMENSIONS") -> InvalidPhotoDimensionsException(response, plainAnswer, message, cause)
|
||||
else -> null
|
||||
}
|
||||
} ?: CommonRequestException(response, plainAnswer, message, cause)
|
||||
@@ -41,3 +42,6 @@ class MessageIsNotModifiedException(response: Response, plainAnswer: String, mes
|
||||
|
||||
class MessageToEditNotFoundException(response: Response, plainAnswer: String, message: String?, cause: Throwable?) :
|
||||
RequestException(response, plainAnswer, message, cause)
|
||||
|
||||
class InvalidPhotoDimensionsException(response: Response, plainAnswer: String, message: String?, cause: Throwable?) :
|
||||
RequestException(response, plainAnswer, message, cause)
|
||||
|
@@ -18,7 +18,7 @@ fun String.toMarkdown(): String {
|
||||
|
||||
private val markdownV2LinkEscapes = mutableSetOf(')', '\\')
|
||||
private val markdownV2PreAndCodeEscapes = mutableSetOf('`', '\\')
|
||||
private val markdownV2CommonEscapes = mutableSetOf(
|
||||
private val markdownV2CommonEscapes = setOf(
|
||||
'_',
|
||||
'*',
|
||||
'[', ']',
|
||||
|
Reference in New Issue
Block a user