aboutsummaryrefslogtreecommitdiff
path: root/juick-server-xmpp/src/main/java/com
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-04-05 14:03:09 +0300
committerGravatar Vitaly Takmazov2018-04-05 14:03:09 +0300
commit534d3c6f8ab31c0d41e6a6980f8cbc3f25e8d1b9 (patch)
tree9da4ecad27afa9750a6c0369e181e287944473bf /juick-server-xmpp/src/main/java/com
parent2f53f75e584e0522c8f4783bc28df4ad6eb3033d (diff)
server: commands are not depended on xmpp now
Diffstat (limited to 'juick-server-xmpp/src/main/java/com')
-rw-r--r--juick-server-xmpp/src/main/java/com/juick/server/XMPPConnection.java18
1 files changed, 4 insertions, 14 deletions
diff --git a/juick-server-xmpp/src/main/java/com/juick/server/XMPPConnection.java b/juick-server-xmpp/src/main/java/com/juick/server/XMPPConnection.java
index a277a4a4..ffa145d9 100644
--- a/juick-server-xmpp/src/main/java/com/juick/server/XMPPConnection.java
+++ b/juick-server-xmpp/src/main/java/com/juick/server/XMPPConnection.java
@@ -17,17 +17,13 @@
package com.juick.server;
-import com.juick.Tag;
import com.juick.User;
import com.juick.server.component.LikeEvent;
import com.juick.server.component.MessageEvent;
import com.juick.server.component.PingEvent;
import com.juick.server.component.SubscribeEvent;
-import com.juick.server.helpers.UserInfo;
-import com.juick.server.util.HttpUtils;
-import com.juick.server.util.ImageUtils;
-import com.juick.server.util.TagUtils;
import com.juick.server.helpers.CommandResult;
+import com.juick.server.helpers.UserInfo;
import com.juick.server.xmpp.s2s.BasicXmppSession;
import com.juick.server.xmpp.s2s.StanzaListener;
import com.juick.service.*;
@@ -79,7 +75,6 @@ import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
-import java.util.Optional;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
@@ -182,11 +177,7 @@ public class XMPPConnection implements StanzaListener, NotificationListener {
if (jid.getDomain().equals(router.getDomain().toEscapedString()) || jid.equals(this.jid)) {
com.juick.Message jmsg = message.getExtension(com.juick.Message.class);
if (jmsg != null) {
- if (jid.getLocal().equals("recomm")) {
- User fromUser = jmsg.getUser();
- com.juick.Message msg = messagesService.getMessage(jmsg.getMid());
- applicationEventPublisher.publishEvent(new LikeEvent(this, fromUser, msg));
- } else if (jid.getLocal().equals("pm")) {
+ if (jid.getLocal().equals("pm")) {
applicationEventPublisher.publishEvent(new MessageEvent(this, jmsg));
} else {
if (jmsg.getRid() > 0) {
@@ -600,10 +591,10 @@ public class XMPPConnection implements StanzaListener, NotificationListener {
}
incomingMessageJuick(user_from, msg.getFrom(), msg.getBody(), attachmentURI);
}
- public com.juick.Message incomingMessageJuick(User user_from, Jid from, String command, @Nonnull URI attachment)
+ private void incomingMessageJuick(User user_from, Jid from, String command, @Nonnull URI attachment)
throws Exception {
if (StringUtils.isBlank(command) && attachment.toString().isEmpty()) {
- return null;
+ return;
}
int commandlen = command.length();
@@ -617,7 +608,6 @@ public class XMPPConnection implements StanzaListener, NotificationListener {
if (StringUtils.isNotBlank(result.getText())) {
sendReply(from, result.getText());
}
- return result.getNewMessage();
}
@Override