diff options
Diffstat (limited to 'juick-server/src/main/java/com')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/TelegramBotManager.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/juick-server/src/main/java/com/juick/server/TelegramBotManager.java b/juick-server/src/main/java/com/juick/server/TelegramBotManager.java index de54c3ce..5743a15e 100644 --- a/juick-server/src/main/java/com/juick/server/TelegramBotManager.java +++ b/juick-server/src/main/java/com/juick/server/TelegramBotManager.java @@ -165,8 +165,12 @@ public class TelegramBotManager implements ApplicationListener<MessageEvent> { } else { Message replyMessage = message.replyToMessage(); if (replyMessage != null) { - if (replyMessage.entities() != null) { - Optional<MessageEntity> juickLink = Arrays.stream(replyMessage.entities()) + MessageEntity [] entities = replyMessage.entities(); + if (entities == null) { + entities = replyMessage.captionEntities(); + } + if (entities != null) { + Optional<MessageEntity> juickLink = Arrays.stream(entities) .filter(this::isJuickLink) .findFirst(); if (juickLink.isPresent()) { |