diff options
author | 2018-01-17 14:43:32 +0300 | |
---|---|---|
committer | 2018-01-17 14:45:10 +0300 | |
commit | faaff6d121158101167b704e7c4370c2fab46891 (patch) | |
tree | 80834bf8dcf41f706cd1b9818ce09bd436cde65e | |
parent | be8d139d8ea58396107cf1a2b12ad16ac8bda6d6 (diff) |
enable markdown for telegram
-rw-r--r-- | juick-api/src/main/java/com/juick/api/TelegramBotManager.java | 4 |
1 files changed, 2 insertions, 2 deletions
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<MessageEvent> { 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<Long> users = telegramService.getTelegramIdentifiers(subscriptionService.getSubscribedUsers(jmsg.getUser().getUid(), jmsg.getMid())); List<Long> chats = telegramService.getChats(); @@ -103,7 +103,7 @@ public class TelegramBotManager implements ApplicationListener<MessageEvent> { } 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)); |