aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/juick/XMPPManager.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/main/java/com/juick/XMPPManager.java b/src/main/java/com/juick/XMPPManager.java
index 20b8259b..84ae36eb 100644
--- a/src/main/java/com/juick/XMPPManager.java
+++ b/src/main/java/com/juick/XMPPManager.java
@@ -496,11 +496,15 @@ public class XMPPManager implements NotificationListener {
public ClientMessage incomingMessage(Message msg) {
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 null;
+ if (error != null) {
+ var shouldDeactivate = error.getCondition().equals(Condition.RESOURCE_CONSTRAINT)
+ || error.getType().equals(StanzaError.Type.CANCEL);
+ if (shouldDeactivate) {
+ if (userService.setActiveStatusForJID(msg.getFrom().toEscapedString(),
+ UserService.ActiveStatus.Inactive)) {
+ logger.info("{} is inactive now", msg.getFrom());
+ return null;
+ }
}
}
return null;