From faaff6d121158101167b704e7c4370c2fab46891 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 17 Jan 2018 14:43:32 +0300 Subject: enable markdown for telegram --- juick-api/src/main/java/com/juick/api/TelegramBotManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'juick-api/src/main/java/com/juick/api') diff --git a/juick-api/src/main/java/com/juick/api/TelegramBotManager.java b/juick-api/src/main/java/com/juick/api/TelegramBotManager.java index 321ad7b1..5523349f 100644 --- a/juick-api/src/main/java/com/juick/api/TelegramBotManager.java +++ b/juick-api/src/main/java/com/juick/api/TelegramBotManager.java @@ -91,7 +91,7 @@ public class TelegramBotManager implements ApplicationListener { com.juick.Message jmsg = event.getMessage(); String msgUrl = formatUrl(jmsg); if (jmsg.getMid() > 0 && jmsg.getRid() == 0) { - String msg = String.format("[%s](%s) %s", MSG_LINK, msgUrl, formatPost(jmsg)); + String msg = String.format("[%s](%s) %s", MSG_LINK, msgUrl, formatPost(jmsg, true)); List users = telegramService.getTelegramIdentifiers(subscriptionService.getSubscribedUsers(jmsg.getUser().getUid(), jmsg.getMid())); List chats = telegramService.getChats(); @@ -103,7 +103,7 @@ public class TelegramBotManager implements ApplicationListener { } else { // get quote com.juick.Message msg = messagesService.getReply(jmsg.getMid(), jmsg.getRid()); - String fmsg = String.format("[%s](%s) %s", MSG_LINK, msgUrl, formatPost(msg)); + String fmsg = String.format("[%s](%s) %s", MSG_LINK, msgUrl, formatPost(msg, true)); telegramService.getTelegramIdentifiers( subscriptionService.getUsersSubscribedToComments(jmsg.getMid(), jmsg.getUser().getUid()) ).forEach(c -> telegramNotify(c, fmsg)); -- cgit v1.2.3