Skip to content

Commit

Permalink
Fix expected telegrams error message when the bot cant find the messa…
Browse files Browse the repository at this point in the history
…ge to reply to (#255)
  • Loading branch information
rob93c authored Jul 18, 2024
1 parent c23f2f1 commit 7fdca8e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ private File retrieveFile(String fileId) throws TelegramApiException {
}

private void processFailure(TelegramRequest request, TelegramApiException e) {
if (e.getMessage().endsWith("Bad Request: message to reply not found")) {
if (e.getMessage().endsWith("Bad Request: message to be replied not found")) {
LOGGER.atInfo().log("Unable to reply to the {}: the message sent has been deleted", request.getDescription());
} else if ("The video could not be processed successfully".equals(e.getMessage())) {
LOGGER.atInfo().log("Unable to reply to the {}: the file is corrupted", request.getDescription());
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%highlight([%d{"dd/MM/YYYY HH:mm:ss.SSS' CET'", CET}] %-5level) %boldCyan([%t] %-11logger{0}) %boldYellow(-) %msg%n%red(%ex)</pattern>
<pattern>%highlight([%d{"dd/MM/YYYY HH:mm:ss.SSS' CET'", CET}] %-5level) %boldCyan([%-10t] %-11logger{0}) %boldYellow(-) %msg%n%red(%ex)</pattern>
</encoder>
</appender>

Expand Down

0 comments on commit 7fdca8e

Please sign in to comment.