mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-25 19:48:43 +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`
|
* `StorageFile` now able to accept any factory of `Input`
|
||||||
* `StorageFileInfo` was added to avoid strange collisions with throws in `StorageFile`
|
* `StorageFileInfo` was added to avoid strange collisions with throws in `StorageFile`
|
||||||
* Fixes issue with `hashTag` for markdown
|
* Fixes issue with `hashTag` for markdown
|
||||||
|
* `InvalidPhotoDimensionsException` was added for cases when `PHOTO_INVALID_DIMENSION` answer received
|
||||||
|
|
||||||
## 0.25.0
|
## 0.25.0
|
||||||
|
|
||||||
* Common:
|
* Common:
|
||||||
|
@ -14,6 +14,7 @@ fun newRequestException(
|
|||||||
description == "Bad Request: message to edit not found" -> MessageToEditNotFoundException(response, plainAnswer, message, cause)
|
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.contains("Bad Request: message is not modified") -> MessageIsNotModifiedException(response, plainAnswer, message, cause)
|
||||||
description == "Unauthorized" -> UnauthorizedException(response, plainAnswer, message, cause)
|
description == "Unauthorized" -> UnauthorizedException(response, plainAnswer, message, cause)
|
||||||
|
description.contains("PHOTO_INVALID_DIMENSIONS") -> InvalidPhotoDimensionsException(response, plainAnswer, message, cause)
|
||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
} ?: CommonRequestException(response, plainAnswer, message, cause)
|
} ?: 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?) :
|
class MessageToEditNotFoundException(response: Response, plainAnswer: String, message: String?, cause: Throwable?) :
|
||||||
RequestException(response, plainAnswer, message, cause)
|
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 markdownV2LinkEscapes = mutableSetOf(')', '\\')
|
||||||
private val markdownV2PreAndCodeEscapes = mutableSetOf('`', '\\')
|
private val markdownV2PreAndCodeEscapes = mutableSetOf('`', '\\')
|
||||||
private val markdownV2CommonEscapes = mutableSetOf(
|
private val markdownV2CommonEscapes = setOf(
|
||||||
'_',
|
'_',
|
||||||
'*',
|
'*',
|
||||||
'[', ']',
|
'[', ']',
|
||||||
|
Loading…
Reference in New Issue
Block a user