From 1e34177b403ec059414dcdd56c452d2ce3db46cd Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 6 Feb 2018 12:43:16 +0300 Subject: api: do not post PING, LOGIN and HELP from telegram --- juick-api/src/main/java/com/juick/api/TelegramBotManager.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'juick-api/src/main') 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 54dab247..0273a314 100644 --- a/juick-api/src/main/java/com/juick/api/TelegramBotManager.java +++ b/juick-api/src/main/java/com/juick/api/TelegramBotManager.java @@ -150,7 +150,11 @@ public class TelegramBotManager implements ApplicationListener { text = StringUtils.EMPTY; } if (StringUtils.isNotEmpty(text) || StringUtils.isNotEmpty(attachment)) { - if (text.equalsIgnoreCase("/login") || text.equalsIgnoreCase("/start") + if (text.equalsIgnoreCase("LOGIN") + || text.equalsIgnoreCase("PING") + || text.equalsIgnoreCase("HELP") + || text.equalsIgnoreCase("/login") + || text.equalsIgnoreCase("/start") || text.equalsIgnoreCase("/help")) { String msgUrl = "http://juick.com/login?" + userService.getHashByUID(user_from.getUid()); String msg = String.format("Hi, %s!\nYou can post messages and images to Juick there.\n" + -- cgit v1.2.3