diff options
Diffstat (limited to 'juick-server-xmpp/src/main/java')
-rw-r--r-- | juick-server-xmpp/src/main/java/com/juick/server/XMPPConnection.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/juick-server-xmpp/src/main/java/com/juick/server/XMPPConnection.java b/juick-server-xmpp/src/main/java/com/juick/server/XMPPConnection.java index 7ea112164..2bdec0a77 100644 --- a/juick-server-xmpp/src/main/java/com/juick/server/XMPPConnection.java +++ b/juick-server-xmpp/src/main/java/com/juick/server/XMPPConnection.java @@ -588,7 +588,7 @@ public class XMPPConnection implements StanzaListener, NotificationListener { if (oobX != null) { attachmentURI = oobX.getUri(); } - incomingMessageJuick(user_from, msg.getFrom(), msg.getBody(), attachmentURI); + incomingMessageJuick(user_from, msg.getFrom(), StringUtils.defaultString(msg.getBody()), attachmentURI); } private void incomingMessageJuick(User user_from, Jid from, String command, @Nonnull URI attachment) throws Exception { @@ -600,10 +600,10 @@ public class XMPPConnection implements StanzaListener, NotificationListener { // COMPATIBILITY if (commandlen > 7 && command.substring(0, 3).equalsIgnoreCase("PM ")) { - command = command.substring(3).trim(); + command = command.substring(3); } - CommandResult result = commandsManager.processCommand(user_from, from, command, attachment); + CommandResult result = commandsManager.processCommand(user_from, from, command.trim(), attachment); if (StringUtils.isNotBlank(result.getText())) { sendReply(from, result.getText()); } |