From 036a67e5571b39a1f4b65f6f94bfdfcd58097ebc Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 19 Feb 2018 17:26:12 +0300 Subject: push notifications are not using xmpp anymore --- juick-server/src/main/java/com/juick/server/XMPPBot.java | 6 ------ juick-server/src/main/java/com/juick/server/api/PM.java | 3 --- juick-server/src/main/java/com/juick/server/api/Post.java | 2 -- 3 files changed, 11 deletions(-) (limited to 'juick-server') 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; } -- cgit v1.2.3