aboutsummaryrefslogtreecommitdiff
path: root/juick-server-xmpp/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server-xmpp/src/main/java/com')
-rw-r--r--juick-server-xmpp/src/main/java/com/juick/server/XMPPConnection.java23
1 files changed, 11 insertions, 12 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 c800b65d..db925400 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
@@ -173,6 +173,17 @@ public class XMPPConnection implements StanzaListener, NotificationListener {
});
router.addInboundMessageListener(e -> {
Message message = e.getMessage();
+ if (message.getType() != null && message.getType().equals(Message.Type.ERROR)) {
+ StanzaError error = message.getError();
+ if (error != null && error.getCondition().equals(Condition.RESOURCE_CONSTRAINT)) {
+ // offline query is full, deactivating this jid
+ if (userService.setActiveStatusForJID(message.getFrom().toEscapedString(), UserService.ActiveStatus.Inactive)) {
+ logger.info("{} is inactive now", message.getFrom());
+ return;
+ }
+ }
+ return;
+ }
Jid jid = message.getTo();
if (jid.getDomain().equals(router.getDomain().toEscapedString()) || jid.equals(this.jid)) {
com.juick.Message jmsg = message.getExtension(com.juick.Message.class);
@@ -564,18 +575,6 @@ public class XMPPConnection implements StanzaListener, NotificationListener {
}
public void incomingMessage(Message msg) throws Exception {
- if (msg.getType() != null && msg.getType().equals(Message.Type.ERROR)) {
- StanzaError error = msg.getError();
- if (error != null && error.getCondition().equals(Condition.RESOURCE_CONSTRAINT)) {
- // offline query is full, deactivating this jid
- if (userService.setActiveStatusForJID(msg.getFrom().toEscapedString(), UserService.ActiveStatus.Inactive)) {
- logger.info("{} is inactive now", msg.getFrom());
- return;
- }
- }
- return;
- }
-
User user_from;
user_from = userService.getUserByJID(msg.getFrom().asBareJid().toEscapedString());
if (user_from == null) {