diff options
Diffstat (limited to 'juick-api/src/main/java/com/juick/api')
-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 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)); } } }); |