aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/server/XMPPConnection.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/server/XMPPConnection.java')
-rw-r--r--src/main/java/com/juick/server/XMPPConnection.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/com/juick/server/XMPPConnection.java b/src/main/java/com/juick/server/XMPPConnection.java
index 01cbd32b..979ba1fd 100644
--- a/src/main/java/com/juick/server/XMPPConnection.java
+++ b/src/main/java/com/juick/server/XMPPConnection.java
@@ -598,8 +598,10 @@ public class XMPPConnection implements StanzaListener, NotificationListener {
return incomingMessageJuick(user_from, msg.getFrom(), StringUtils.defaultString(msg.getBody()), attachment);
} else {
// PM
- result = incomingMessageJuick(user_from, msg.getFrom(),
- String.format("@%s %s", msg.getTo().getLocal(), StringUtils.defaultString(msg.getBody())), attachment);
+ if (!StringUtils.isEmpty(msg.getBody())) {
+ result = incomingMessageJuick(user_from, msg.getFrom(),
+ String.format("@%s %s", msg.getTo().getLocal(), StringUtils.defaultString(msg.getBody())), attachment);
+ }
}
messagesService.getUnread(user_from).forEach(mid -> messagesService.setRead(user_from, mid));
} catch (Exception e1) {