diff options
Diffstat (limited to 'juick-server/src/main')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/TelegramBotManager.java | 3 |
1 files changed, 2 insertions, 1 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 0d765b71..b264d080 100644 --- a/juick-server/src/main/java/com/juick/server/TelegramBotManager.java +++ b/juick-server/src/main/java/com/juick/server/TelegramBotManager.java @@ -262,7 +262,8 @@ public class TelegramBotManager implements ApplicationListener<MessageEvent> { }); } else { SendPhoto telegramPhoto = new SendPhoto(chatId, attachment); - telegramPhoto.caption(msg); + String trimmedPost = msg.length() > 160 ? msg.substring(0, 159) + "..." : msg; + telegramPhoto.caption(trimmedPost); if (replyTo > 0) { telegramPhoto.replyToMessageId(replyTo); } |