aboutsummaryrefslogtreecommitdiff
path: root/juick-api/src/main/java/com
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-02-06 12:43:16 +0300
committerGravatar Vitaly Takmazov2018-02-06 12:43:28 +0300
commit1e34177b403ec059414dcdd56c452d2ce3db46cd (patch)
treed580d0d3be1f375fe4dac306e402493d2105584e /juick-api/src/main/java/com
parent8c2b058d94c57b8e6e3f0a85d757ad9cc5fa19ec (diff)
api: do not post PING, LOGIN and HELP from telegram
Diffstat (limited to 'juick-api/src/main/java/com')
-rw-r--r--juick-api/src/main/java/com/juick/api/TelegramBotManager.java6
1 files changed, 5 insertions, 1 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 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<MessageEvent> {
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" +