aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-05-13 11:48:19 +0300
committerGravatar Vitaly Takmazov2016-05-13 11:48:19 +0300
commit324391a3b775f6508b316f72268d776e50aff2cc (patch)
treed56d0ad1fadce73b6b8d8e2a523dac3ed14fd047 /src
parente9202d13bca4894efb7e365d42eb9b703a0dc7eb (diff)
full message format, take 3
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/juick/api/TelegramBotHook.java5
1 files 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<SendMessage, SendResponse>() {
+ bot.execute(new SendMessage(c, msg), new Callback<SendMessage, SendResponse>() {
@Override
public void onResponse(SendMessage request, SendResponse response) {
logger.info("got response: " + response.message().toString());