From 2629afbbf5fdd8a23703fafa89bf7a6789de98bb Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 11 Nov 2016 10:28:44 +0300 Subject: telegram: fix reply quote --- juick-api/src/main/java/com/juick/api/TelegramBotHook.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'juick-api/src/main') 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)); } } }); -- cgit v1.2.3