diff options
author | Vitaly Takmazov | 2018-04-05 14:03:09 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-04-05 14:03:09 +0300 |
commit | 534d3c6f8ab31c0d41e6a6980f8cbc3f25e8d1b9 (patch) | |
tree | 9da4ecad27afa9750a6c0369e181e287944473bf /juick-www/src/main/java | |
parent | 2f53f75e584e0522c8f4783bc28df4ad6eb3033d (diff) |
server: commands are not depended on xmpp now
Diffstat (limited to 'juick-www/src/main/java')
-rw-r--r-- | juick-www/src/main/java/com/juick/www/controllers/NewMessage.java | 8 |
1 files changed, 4 insertions, 4 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 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); |