aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick/api/PM.java
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2013-11-16 03:22:57 +0700
committerGravatar Ugnich Anton2013-11-16 03:22:57 +0700
commit211edb389dcf5912b02346869264ea5dcd4cf75e (patch)
tree43c6c729d5293e3df9e88ab8f691c9f415a8ae31 /src/java/com/juick/api/PM.java
parent91bf74631157d8e559686ca25e4980f155d88438 (diff)
Messages.doGetHome
Diffstat (limited to 'src/java/com/juick/api/PM.java')
-rw-r--r--src/java/com/juick/api/PM.java6
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();