diff options
author | Vitaly Takmazov | 2017-12-18 21:52:28 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-12-18 21:52:28 +0300 |
commit | 0b19e12587e25f51a2f398bb9014b71ff9aacbbd (patch) | |
tree | 1f3de3b3b49bc436cc242f5d33a40132e8dfbeb6 /juick-server-core/src/main | |
parent | 86118361420b2d441e824e4f113a1f4f4c75664b (diff) |
xmpp: fix tests
Diffstat (limited to 'juick-server-core/src/main')
-rw-r--r-- | juick-server-core/src/main/java/com/juick/server/protocol/JuickProtocol.java | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/juick-server-core/src/main/java/com/juick/server/protocol/JuickProtocol.java b/juick-server-core/src/main/java/com/juick/server/protocol/JuickProtocol.java index 9cb37151..1be34a3f 100644 --- a/juick-server-core/src/main/java/com/juick/server/protocol/JuickProtocol.java +++ b/juick-server-core/src/main/java/com/juick/server/protocol/JuickProtocol.java @@ -130,28 +130,6 @@ public class JuickProtocol { return "Your feed: \n" + String.join("\n", messages.stream().map(PlainTextFormatter::formatPost).collect(Collectors.toList())); } - - - - @UserCommand(pattern = "^#(\\d+)(\\+?)$", help = "#1234 - Show message (#1234+ - message with replies)") - public String commandShow(User user, String... arguments) { - boolean showReplies = arguments[1].length() > 0; - int mid = NumberUtils.toInt(arguments[0], 0); - if (mid == 0) { - return "Error"; - } - Message msg = messagesService.getMessage(mid); - if (msg != null) { - if (showReplies) { - List<Message> replies = messagesService.getReplies(mid); - replies.add(0, msg); - return String.join("\n", - replies.stream().map(PlainTextFormatter::formatPost).collect(Collectors.toList())); - } - return PlainTextFormatter.formatPost(msg); - } - return "Message not found"; - } @UserCommand(pattern = "^(#|\\.)(\\d+)((\\.|\\-|\\/)(\\d+))?\\s([\\s\\S]+)", help = "#1234 *tag *tag2 - edit tags\n#1234 text - reply to message") public String EditOrReply(User user, String... args) { |