aboutsummaryrefslogtreecommitdiff
path: root/juick-api/src/main
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-07-18 16:32:04 +0300
committerGravatar Vitaly Takmazov2016-07-18 16:32:04 +0300
commit8649c960a68300dc8ebbc02920425a813d16551a (patch)
tree42aa4092b4446607782f0b1810d3240f99b70e75 /juick-api/src/main
parent810ed84fcfe4ca063bd3faeb67beae0e027e19e0 (diff)
juick-api: telegram edited messages support
Diffstat (limited to 'juick-api/src/main')
-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());