diff options
author | Vitaly Takmazov | 2016-11-11 10:28:44 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-11-11 10:28:44 +0300 |
commit | 2629afbbf5fdd8a23703fafa89bf7a6789de98bb (patch) | |
tree | 1483e97f61c992aa7f9277787963fbe02e1876a3 /juick-api/src/main/java/com | |
parent | 861986cc51212295494c529d8a8f522abe32f245 (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.java | 7 |
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 729817050..2ec380dbd 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)); } } }); |