From 13bf7289cc2dac1897530e6d465bf0a0fef8b3d1 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 24 Oct 2018 14:09:57 +0300 Subject: tg: update caption limit to 1024 --- juick-server/src/main/java/com/juick/server/TelegramBotManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'juick-server/src/main/java/com') 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 c946d7c9..8e8d0104 100644 --- a/juick-server/src/main/java/com/juick/server/TelegramBotManager.java +++ b/juick-server/src/main/java/com/juick/server/TelegramBotManager.java @@ -266,7 +266,7 @@ public class TelegramBotManager implements NotificationListener { }); } else { SendPhoto telegramPhoto = new SendPhoto(chatId, attachment); - String trimmedPost = msg.length() > 160 ? msg.substring(0, 159) + "..." : msg; + String trimmedPost = msg.length() > 1024 ? msg.substring(0, 1023) + "..." : msg; telegramPhoto.caption(trimmedPost); if (replyTo > 0) { telegramPhoto.replyToMessageId(replyTo); -- cgit v1.2.3