aboutsummaryrefslogtreecommitdiff
path: root/juick-api/src/main/java/com/juick/api/TelegramBotHook.java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-api/src/main/java/com/juick/api/TelegramBotHook.java')
-rw-r--r--juick-api/src/main/java/com/juick/api/TelegramBotHook.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/juick-api/src/main/java/com/juick/api/TelegramBotHook.java b/juick-api/src/main/java/com/juick/api/TelegramBotHook.java
index 682001f6..f440f8bc 100644
--- a/juick-api/src/main/java/com/juick/api/TelegramBotHook.java
+++ b/juick-api/src/main/java/com/juick/api/TelegramBotHook.java
@@ -153,8 +153,11 @@ public class TelegramBotHook {
Update update = BotUtils.parseUpdate(reader);
Message message = update.message();
if (update.message() == null) {
- logger.log(Level.SEVERE, "error parsing telegram update: " + update.toString());
- return;
+ message = update.editedMessage();
+ if (message == null) {
+ logger.log(Level.SEVERE, "error parsing telegram update: " + update.toString());
+ return;
+ }
}
logger.info(String.format("got telegram msg %s", message.toString()));
User user_from = UserQueries.getUserByUID(jdbc, getUser(message.chat().id())).orElse(new User());