aboutsummaryrefslogtreecommitdiff
path: root/juick-xmpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'juick-xmpp/src')
-rw-r--r--juick-xmpp/src/main/java/com/juick/components/JuickBot.java4
-rw-r--r--juick-xmpp/src/test/java/com/juick/xmpp/server/XMPPServerTests.java4
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