From 534d3c6f8ab31c0d41e6a6980f8cbc3f25e8d1b9 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 5 Apr 2018 14:03:09 +0300 Subject: server: commands are not depended on xmpp now --- juick-server/src/main/java/com/juick/server/TelegramBotManager.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'juick-server/src/main/java/com/juick/server/TelegramBotManager.java') diff --git a/juick-server/src/main/java/com/juick/server/TelegramBotManager.java b/juick-server/src/main/java/com/juick/server/TelegramBotManager.java index 9fcf08da..54edb5db 100644 --- a/juick-server/src/main/java/com/juick/server/TelegramBotManager.java +++ b/juick-server/src/main/java/com/juick/server/TelegramBotManager.java @@ -80,7 +80,7 @@ public class TelegramBotManager implements NotificationListener { @Inject private UserService userService; @Inject - private XMPPConnection xmppConnection; + private CommandsManager commandsManager; @Value("${upload_tmp_dir:#{systemEnvironment['TEMP'] ?: '/tmp'}}") private String tmpDir; @@ -184,7 +184,7 @@ public class TelegramBotManager implements NotificationListener { int rid = Integer.valueOf(uriComponents.getFragment()); prefix = String.format("#%d/%d ", mid, rid); } - xmppConnection.incomingMessageJuick(user_from, null,prefix + text, attachment); + commandsManager.processCommand(user_from, null,prefix + text, attachment); telegramNotify(message.from().id().longValue(), "Reply sent", StringUtils.EMPTY); } else { logger.warn("invalid path: {}", path); @@ -201,7 +201,7 @@ public class TelegramBotManager implements NotificationListener { "Can not reply to this message", replyMessage.messageId(), StringUtils.EMPTY); } } else { - xmppConnection.incomingMessageJuick(user_from, null, text, attachment); + commandsManager.processCommand(user_from, null, text, attachment); telegramNotify(message.from().id().longValue(), "Message sent", StringUtils.EMPTY); } } -- cgit v1.2.3