diff options
Diffstat (limited to 'src/main/java/com/juick/server/api')
-rw-r--r-- | src/main/java/com/juick/server/api/webhooks/TelegramWebhook.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/com/juick/server/api/webhooks/TelegramWebhook.java b/src/main/java/com/juick/server/api/webhooks/TelegramWebhook.java index 3301d60a..e2f40a18 100644 --- a/src/main/java/com/juick/server/api/webhooks/TelegramWebhook.java +++ b/src/main/java/com/juick/server/api/webhooks/TelegramWebhook.java @@ -21,6 +21,7 @@ import com.juick.server.TelegramBotManager; import com.pengrad.telegrambot.BotUtils; import com.pengrad.telegrambot.model.Update; import org.apache.commons.io.IOUtils; +import org.apache.commons.text.StringEscapeUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; @@ -50,7 +51,7 @@ public class TelegramWebhook { @ResponseStatus(value = HttpStatus.OK) public void processUpdate(InputStream body) throws Exception { String data = IOUtils.toString(body, StandardCharsets.UTF_8); - logger.debug("Telegram update: {}", data); + logger.debug("Telegram update: {}", StringEscapeUtils.unescapeJava(data)); Update update = BotUtils.parseUpdate(data); telegramBotManager.processUpdate(update); } |