aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/TelegramBotManager.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-04-05 14:03:09 +0300
committerGravatar Vitaly Takmazov2018-04-05 14:03:09 +0300
commit534d3c6f8ab31c0d41e6a6980f8cbc3f25e8d1b9 (patch)
tree9da4ecad27afa9750a6c0369e181e287944473bf /juick-server/src/main/java/com/juick/server/TelegramBotManager.java
parent2f53f75e584e0522c8f4783bc28df4ad6eb3033d (diff)
server: commands are not depended on xmpp now
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/TelegramBotManager.java')
-rw-r--r--juick-server/src/main/java/com/juick/server/TelegramBotManager.java6
1 files changed, 3 insertions, 3 deletions
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);
}
}