diff options
Diffstat (limited to 'src/java/com/juick/api/PM.java')
-rw-r--r-- | src/java/com/juick/api/PM.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/java/com/juick/api/PM.java b/src/java/com/juick/api/PM.java index 285f9ff6..700f1665 100644 --- a/src/java/com/juick/api/PM.java +++ b/src/java/com/juick/api/PM.java @@ -59,14 +59,12 @@ public class PM { return; } - if (UserQueries.isInBL(sql, uid, vuid)) { + if (UserQueries.isInBL(sql, uid, vuid) || UserQueries.isInBL(sql, vuid, uid)) { response.sendError(403); return; } if (PMQueries.createPM(sql, vuid, uid, body)) { - Main.replyJSON(request, response, ""); - Message msg = new Message(); msg.from = new JID("juick", "juick.com", null); msg.to = new JID(Integer.toString(uid), "push.juick.com", null); @@ -80,6 +78,8 @@ public class PM { msg.to.Host = "ws.juick.com"; xmpp.send(msg); + Main.replyJSON(request, response, com.juick.json.Message.toJSON(jmsg).toString()); + String jid = UserQueries.getJIDbyUID(sql, uid); if (jid != null) { Message mm = new Message(); |