From 534d3c6f8ab31c0d41e6a6980f8cbc3f25e8d1b9 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 5 Apr 2018 14:03:09 +0300 Subject: server: commands are not depended on xmpp now --- juick-www/src/main/java/com/juick/www/controllers/NewMessage.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'juick-www/src/main/java/com/juick') 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 b93d6f57..07605830 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 @@ -149,7 +149,7 @@ public class NewMessage { subscriptionService.subscribeMessage(mid, visitor.getUid()); Message xmsg = new Message(); - xmsg.setFrom(Jid.of("juick@juick.com")); + xmsg.setFrom(botJid); xmsg.setType(Message.Type.CHAT); xmsg.setThread("juick-" + mid); @@ -182,7 +182,7 @@ public class NewMessage { xmsg.setBody("Reply by @" + jmsg.getUser().getName() + ":\n>" + quote + "\n" + body + "\n\n#" + mid + "/" + ridnew + " http://juick.com/" + mid + "#" + ridnew); - xmsg.setTo(Jid.of("juick@juick.com")); + xmsg.setTo(botJid); xmpp.send(xmsg); } else { logger.warn("XMPP unavailable"); @@ -218,8 +218,8 @@ public class NewMessage { if (pmQueriesService.createPM(visitor.getUid(), userTo.getUid(), body)) { if (xmpp.isConnected()) { Message msg = new Message(); - msg.setFrom(Jid.of("juick@juick.com")); - msg.setTo(Jid.of("pm@juick.com")); + msg.setFrom(botJid); + msg.setTo(botJid.withLocal("pm")); com.juick.Message jmsg = new com.juick.Message(); jmsg.setUser(visitor); jmsg.setText(body); -- cgit v1.2.3