From 501828529cc4fefb9fdca0ebde52c320990541b2 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 1 Jul 2022 00:13:59 +0300 Subject: Bump `java-telegram-bot-api` to 6.1.0 * make compatible with API changes --- src/main/java/com/juick/TelegramBotManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java') diff --git a/src/main/java/com/juick/TelegramBotManager.java b/src/main/java/com/juick/TelegramBotManager.java index eb8c2b83..20f31b1b 100644 --- a/src/main/java/com/juick/TelegramBotManager.java +++ b/src/main/java/com/juick/TelegramBotManager.java @@ -165,7 +165,7 @@ public class TelegramBotManager implements NotificationListener { if (!user_from.isAnonymous()) { URI attachment = URI.create(StringUtils.EMPTY); if (message.photo() != null) { - String fileId = Arrays.stream(message.photo()).max(Comparator.comparingInt(PhotoSize::fileSize)) + String fileId = Arrays.stream(message.photo()).max(Comparator.comparingLong(PhotoSize::fileSize)) .orElse(new PhotoSize()).fileId(); if (StringUtils.isNotEmpty(fileId)) { GetFile request = new GetFile(fileId); -- cgit v1.2.3