From 324391a3b775f6508b316f72268d776e50aff2cc Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 13 May 2016 11:48:19 +0300 Subject: full message format, take 3 --- src/main/java/com/juick/api/TelegramBotHook.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/juick/api/TelegramBotHook.java b/src/main/java/com/juick/api/TelegramBotHook.java index 90c644af..ed3e8942 100644 --- a/src/main/java/com/juick/api/TelegramBotHook.java +++ b/src/main/java/com/juick/api/TelegramBotHook.java @@ -60,9 +60,10 @@ public class TelegramBotHook { if (jmsg.getAttachmentURL() != null) { sb.append(jmsg.getAttachmentURL()); } - sb.append("https://juick.com/" + jmsg.getMID()); + sb.append("https://juick.com/").append(jmsg.getMID()); + String msg = sb.toString(); chats.stream().forEach(c -> { - bot.execute(new SendMessage(c, sb.toString()), new Callback() { + bot.execute(new SendMessage(c, msg), new Callback() { @Override public void onResponse(SendMessage request, SendResponse response) { logger.info("got response: " + response.message().toString()); -- cgit v1.2.3