mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-22 08:13:47 +00:00
InvalidPhotoDimensionsException
This commit is contained in:
parent
4e49de0dd7
commit
048aa93044
@ -48,6 +48,8 @@
|
||||
* `StorageFile` now able to accept any factory of `Input`
|
||||
* `StorageFileInfo` was added to avoid strange collisions with throws in `StorageFile`
|
||||
* Fixes issue with `hashTag` for markdown
|
||||
* `InvalidPhotoDimensionsException` was added for cases when `PHOTO_INVALID_DIMENSION` answer received
|
||||
|
||||
## 0.25.0
|
||||
|
||||
* Common:
|
||||
|
@ -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(
|
||||
'_',
|
||||
'*',
|
||||
'[', ']',
|
||||
|
Loading…
Reference in New Issue
Block a user