diff options
author | 2018-01-30 13:33:57 +0300 | |
---|---|---|
committer | 2018-01-30 13:33:57 +0300 | |
commit | 1e5c0403d3339c40950106737ef17727d786f6d4 (patch) | |
tree | bd65ac05764397e3b45fc8e15646956408e8a48b /juick-xmpp/src | |
parent | 59e0c016bcb3e5f5260bf35bed63994fc9df3016 (diff) |
xmpp: fix description of subscribeMessage command
Diffstat (limited to 'juick-xmpp/src')
-rw-r--r-- | juick-xmpp/src/main/java/com/juick/components/JuickBot.java | 4 | ||||
-rw-r--r-- | juick-xmpp/src/test/java/com/juick/xmpp/server/XMPPServerTests.java | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/juick-xmpp/src/main/java/com/juick/components/JuickBot.java b/juick-xmpp/src/main/java/com/juick/components/JuickBot.java index 2884fdd4..9855f958 100644 --- a/juick-xmpp/src/main/java/com/juick/components/JuickBot.java +++ b/juick-xmpp/src/main/java/com/juick/components/JuickBot.java @@ -563,8 +563,8 @@ public class JuickBot implements StanzaListener, AutoCloseable { } return "Error"; } - @UserCommand(pattern = "^(s|u)\\s+#(\\d+)$", help = "S #1234 - subscribe to comments", - patternFlags = Pattern.CASE_INSENSITIVE) + @UserCommand(pattern = "^(s|u)\\s+#(\\d+)$", help = "S #1234 - subscribe to comments" + + "\nU #1234 - unsubscribe from comments", patternFlags = Pattern.CASE_INSENSITIVE) public String commandSubscribeMessage(User user, Jid from, String... args) { boolean subscribe = args[0].equalsIgnoreCase("s"); int mid = NumberUtils.toInt(args[1], 0); diff --git a/juick-xmpp/src/test/java/com/juick/xmpp/server/XMPPServerTests.java b/juick-xmpp/src/test/java/com/juick/xmpp/server/XMPPServerTests.java index 784c29b2..7f08602c 100644 --- a/juick-xmpp/src/test/java/com/juick/xmpp/server/XMPPServerTests.java +++ b/juick-xmpp/src/test/java/com/juick/xmpp/server/XMPPServerTests.java @@ -95,8 +95,8 @@ public class XMPPServerTests extends AbstractJUnit4SpringContextTests { @Test public void botCommandsTests() throws IllegalAccessException, NoSuchMethodException, InvocationTargetException { assertThat(bot.processCommand(new User(), Jid.of("test@localhost"), "PING").get(), is("PONG")); - // tag and user help have two lines, others have 1 - assertThat(bot.processCommand(new User(), Jid.of("test@localhost"), "help").get().split("\n").length, is(20)); + // subscription commands have two lines, others have 1 + assertThat(bot.processCommand(new User(), Jid.of("test@localhost"), "help").get().split("\n").length, is(21)); } @Test |