aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-02-19 17:26:12 +0300
committerGravatar Vitaly Takmazov2018-02-19 17:26:12 +0300
commit036a67e5571b39a1f4b65f6f94bfdfcd58097ebc (patch)
tree188e10399f661750c8eda97ac0cd11154fab5852 /juick-server/src
parent22601571a59c0e08a260b46c6ca3fb2ff37a67a2 (diff)
push notifications are not using xmpp anymore
Diffstat (limited to 'juick-server/src')
-rw-r--r--juick-server/src/main/java/com/juick/server/XMPPBot.java6
-rw-r--r--juick-server/src/main/java/com/juick/server/api/PM.java3
-rw-r--r--juick-server/src/main/java/com/juick/server/api/Post.java2
3 files changed, 0 insertions, 11 deletions
diff --git a/juick-server/src/main/java/com/juick/server/XMPPBot.java b/juick-server/src/main/java/com/juick/server/XMPPBot.java
index d9a53395..46a83777 100644
--- a/juick-server/src/main/java/com/juick/server/XMPPBot.java
+++ b/juick-server/src/main/java/com/juick/server/XMPPBot.java
@@ -248,14 +248,11 @@ public class XMPPBot implements StanzaListener, AutoCloseable {
if (success) {
Message m = new Message();
m.setFrom(jid.asBareJid());
- m.setTo(Jid.of(Integer.toString(uid_to), "push.juick.com", null));
com.juick.Message jmsg = new com.juick.Message();
jmsg.setUser(user_from);
jmsg.setTo(userService.getUserByUID(uid_to).get());
jmsg.setText(msg.getBody());
m.addExtension(jmsg);
- router.sendStanza(m);
-
m.setTo(Jid.of(Integer.toString(uid_to), "ws.juick.com", null));
router.sendStanza(m);
@@ -374,14 +371,11 @@ public class XMPPBot implements StanzaListener, AutoCloseable {
if (ret == 200) {
Message msg = new Message();
msg.setFrom(jid.asBareJid());
- msg.setTo(Jid.of(Integer.toString(user_to.getUid()), "push.juick.com", null));
com.juick.Message jmsg = new com.juick.Message();
jmsg.setUser(user_from);
jmsg.setTo(user_to);
jmsg.setText(body);
msg.addExtension(jmsg);
- router.sendStanza(msg);
-
msg.setTo(Jid.of(Integer.toString(user_to.getUid()), "ws.juick.com", null));
router.sendStanza(msg);
diff --git a/juick-server/src/main/java/com/juick/server/api/PM.java b/juick-server/src/main/java/com/juick/server/api/PM.java
index 4c3128ed..15bd8b5b 100644
--- a/juick-server/src/main/java/com/juick/server/api/PM.java
+++ b/juick-server/src/main/java/com/juick/server/api/PM.java
@@ -92,14 +92,11 @@ public class PM {
if (pmQueriesService.createPM(vuid, userTo.getUid(), body)) {
Message msg = new Message();
msg.setFrom(Jid.of("juick@juick.com"));
- msg.setTo(Jid.of(String.format("%d@push.juick.com", userTo.getUid())));
com.juick.Message jmsg = new com.juick.Message();
jmsg.setUser(visitor);
jmsg.setText(body);
jmsg.setTo(userTo);
msg.addExtension(jmsg);
- serverManager.sendMessage(msg);
-
msg.setTo(Jid.of(String.format("%d@ws.juick.com", userTo.getUid())));
serverManager.sendMessage(msg);
diff --git a/juick-server/src/main/java/com/juick/server/api/Post.java b/juick-server/src/main/java/com/juick/server/api/Post.java
index 19751d2e..8e11089b 100644
--- a/juick-server/src/main/java/com/juick/server/api/Post.java
+++ b/juick-server/src/main/java/com/juick/server/api/Post.java
@@ -202,8 +202,6 @@ public class Post {
xmsg.setTo(Jid.of("juick@ws.juick.com"));
serverManager.sendMessage(xmsg);
- xmsg.setTo(Jid.of("juick@push.juick.com"));
- serverManager.sendMessage(xmsg);
return jmsg;
}