aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/java/com/juick')
-rw-r--r--juick-server/src/main/java/com/juick/server/TelegramBotManager.java9
1 files changed, 5 insertions, 4 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 2d2fd4ac..4b2e5278 100644
--- a/juick-server/src/main/java/com/juick/server/TelegramBotManager.java
+++ b/juick-server/src/main/java/com/juick/server/TelegramBotManager.java
@@ -22,6 +22,7 @@ import com.juick.server.component.LikeEvent;
import com.juick.server.component.MessageEvent;
import com.juick.server.component.PingEvent;
import com.juick.server.component.SubscribeEvent;
+import com.juick.server.helpers.CommandResult;
import com.juick.server.util.HttpUtils;
import com.juick.service.MessagesService;
import com.juick.service.SubscriptionService;
@@ -184,8 +185,8 @@ public class TelegramBotManager implements NotificationListener {
int rid = Integer.valueOf(uriComponents.getFragment());
prefix = String.format("#%d/%d ", mid, rid);
}
- commandsManager.processCommand(user_from, null,prefix + text, attachment);
- telegramNotify(message.from().id().longValue(), "Reply sent", StringUtils.EMPTY);
+ CommandResult result = commandsManager.processCommand(user_from, null,prefix + text, attachment);
+ telegramNotify(message.from().id().longValue(), result.getText(), StringUtils.EMPTY);
} else {
logger.warn("invalid path: {}", path);
}
@@ -201,8 +202,8 @@ public class TelegramBotManager implements NotificationListener {
"Can not reply to this message", replyMessage.messageId(), StringUtils.EMPTY);
}
} else {
- commandsManager.processCommand(user_from, null, text, attachment);
- telegramNotify(message.from().id().longValue(), "Message sent", StringUtils.EMPTY);
+ CommandResult result = commandsManager.processCommand(user_from, null, text, attachment);
+ telegramNotify(message.from().id().longValue(), result.getText(), StringUtils.EMPTY);
}
}
}