From 0b19e12587e25f51a2f398bb9014b71ff9aacbbd Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 18 Dec 2017 21:52:28 +0300 Subject: xmpp: fix tests --- .../com/juick/server/protocol/JuickProtocol.java | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'juick-server-core') 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 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) { -- cgit v1.2.3