diff options
Diffstat (limited to 'juick-www/src')
-rw-r--r-- | juick-www/src/main/java/com/juick/www/controllers/NewMessage.java | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/juick-www/src/main/java/com/juick/www/controllers/NewMessage.java b/juick-www/src/main/java/com/juick/www/controllers/NewMessage.java index 2669c5ecd..4192bc11c 100644 --- a/juick-www/src/main/java/com/juick/www/controllers/NewMessage.java +++ b/juick-www/src/main/java/com/juick/www/controllers/NewMessage.java @@ -352,26 +352,13 @@ public class NewMessage { if (xmpp.isConnected()) { Message msg = new Message(); msg.setFrom(Jid.of("juick@juick.com")); + msg.setTo(Jid.of("pm@s2s.juick.com")); com.juick.Message jmsg = new com.juick.Message(); jmsg.setUser(visitor); jmsg.setText(body); jmsg.setTo(userTo); msg.addExtension(jmsg); - - List<String> jids = userService.getJIDsbyUID(userTo.getUid()); - for (String jid : jids) { - Message mm = new Message(); - mm.setTo(Jid.of(jid)); - mm.setType(Message.Type.CHAT); - if (pmQueriesService.havePMinRoster(visitor.getUid(), jid)) { - mm.setFrom(Jid.of(jmsg.getUser().getName(), "juick.com", "Juick")); - mm.setBody(body); - } else { - mm.setFrom(Jid.of("juick", "juick.com", "Juick")); - mm.setBody("Private message from @" + jmsg.getUser().getName() + ":\n" + body); - } - xmpp.send(mm); - } + xmpp.send(msg); } else { logger.warn("XMPP unavailable"); } |