aboutsummaryrefslogtreecommitdiff
path: root/juick-api/src/main/java/com
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-11-11 10:28:44 +0300
committerGravatar Vitaly Takmazov2016-11-11 10:28:44 +0300
commit2629afbbf5fdd8a23703fafa89bf7a6789de98bb (patch)
tree1483e97f61c992aa7f9277787963fbe02e1876a3 /juick-api/src/main/java/com
parent861986cc51212295494c529d8a8f522abe32f245 (diff)
telegram: fix reply quote
Diffstat (limited to 'juick-api/src/main/java/com')
-rw-r--r--juick-api/src/main/java/com/juick/api/TelegramBotHook.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/juick-api/src/main/java/com/juick/api/TelegramBotHook.java b/juick-api/src/main/java/com/juick/api/TelegramBotHook.java
index 72981705..2ec380db 100644
--- a/juick-api/src/main/java/com/juick/api/TelegramBotHook.java
+++ b/juick-api/src/main/java/com/juick/api/TelegramBotHook.java
@@ -2,6 +2,7 @@ package com.juick.api;
import com.juick.User;
import com.juick.json.MessageSerializer;
+import com.juick.server.MessagesQueries;
import com.juick.server.UserQueries;
import com.juick.server.protocol.JuickProtocol;
import com.neovisionaries.ws.client.*;
@@ -82,9 +83,11 @@ public class TelegramBotHook {
// anonymous
chats.stream().filter(u -> getUser(u) == 0).forEach(c -> telegramNotify(c, msg, msgUrl));
} else {
- String msg = formatPost(jmsg);
+ // get quote
+ com.juick.Message msg = MessagesQueries.getReply(jdbc, jmsg.getMID(), jmsg.getRID());
+ String fmsg = formatPost(msg);
getSubscribersToComments(jmsg.getMID(), jmsg.getUser().getUID()).stream()
- .forEach(c -> telegramNotify(c, msg, msgUrl));
+ .forEach(c -> telegramNotify(c, fmsg, msgUrl));
}
}
});