update condition for ReplyMessageNotFoundException

This commit is contained in:
InsanusMokrassar 2021-03-26 07:03:33 +06:00
parent 112c86c9da
commit 0b2f7a3899
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ fun newRequestException(
cause: Throwable? = null
) = response.description ?.let { description ->
when {
description == "Bad Request: reply message not found" -> ReplyMessageNotFoundException(response, plainAnswer, message, cause)
description == "Bad Request: reply message not found" || description == "Bad Request: replied message not found" -> ReplyMessageNotFoundException(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 == "Unauthorized" -> UnauthorizedException(response, plainAnswer, message, cause)