aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2022-07-01 00:13:59 +0300
committerGravatar Vitaly Takmazov2022-07-01 00:13:59 +0300
commit501828529cc4fefb9fdca0ebde52c320990541b2 (patch)
treebf325c87237bba4e78abdcb5c9b7ca89382b0ec5
parent0fcaa21cb79432ead14b32cca2acc8ea5b8b4457 (diff)
Bump `java-telegram-bot-api` to 6.1.0
* make compatible with API changes
-rw-r--r--pom.xml2
-rw-r--r--src/main/java/com/juick/TelegramBotManager.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/pom.xml b/pom.xml
index 9c259396..9d12ba6a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -155,7 +155,7 @@
<dependency>
<groupId>com.github.pengrad</groupId>
<artifactId>java-telegram-bot-api</artifactId>
- <version>6.0.1</version>
+ <version>6.1.0</version>
</dependency>
<dependency>
<groupId>com.github.scribejava</groupId>
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);