aboutsummaryrefslogtreecommitdiff
path: root/juick-common/src/main
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-03-21 14:12:16 +0300
committerGravatar Vitaly Takmazov2018-03-21 14:12:16 +0300
commitcfa0a72e2822817b5d8fc45e673ca3d40f214572 (patch)
treec9626fef5d57daf95ec6e51bd389b98d732c57a8 /juick-common/src/main
parent403fab0c39e99ffd0b386eb612f3574938ae2125 (diff)
xmpp: feed command
Diffstat (limited to 'juick-common/src/main')
-rw-r--r--juick-common/src/main/java/com/juick/server/protocol/JuickProtocol.java22
1 files changed, 0 insertions, 22 deletions
diff --git a/juick-common/src/main/java/com/juick/server/protocol/JuickProtocol.java b/juick-common/src/main/java/com/juick/server/protocol/JuickProtocol.java
index 1be34a3f..5206e1e8 100644
--- a/juick-common/src/main/java/com/juick/server/protocol/JuickProtocol.java
+++ b/juick-common/src/main/java/com/juick/server/protocol/JuickProtocol.java
@@ -108,28 +108,6 @@ public class JuickProtocol {
-
- @UserCommand(pattern = "^d\\s*\\#([0-9]+)$", patternFlags = Pattern.CASE_INSENSITIVE,
- help = "D #12345 - delete the message")
- public String commandDel(User user, String... args) {
- int mid = NumberUtils.toInt(args[0], 0);
- if (messagesService.deleteMessage(user.getUid(), mid)) {
- return String.format("Message %s deleted", mid);
- }
- return "Error";
- }
-
-
- @UserCommand(pattern = "^(#+)$", help = "# - Show last messages from your feed (## - second page, ...)")
- public String commandMyFeed(User user, String... arguments) {
- // number of # is the page count
- int page = arguments[0].length() - 1;
- List<Integer> mids = messagesService.getMyFeed(user.getUid(), page, false);
- List<Message> messages = messagesService.getMessages(mids);
- // TODO: add instructions for empty feed
- return "Your feed: \n" + String.join("\n",
- messages.stream().map(PlainTextFormatter::formatPost).collect(Collectors.toList()));
- }
@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) {