aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/juick/XMPPManager.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/com/juick/XMPPManager.java b/src/main/java/com/juick/XMPPManager.java
index 84ae36eb..cba6ef3e 100644
--- a/src/main/java/com/juick/XMPPManager.java
+++ b/src/main/java/com/juick/XMPPManager.java
@@ -485,9 +485,13 @@ public class XMPPManager implements NotificationListener {
xmpp.send(ClientPresence.from(reply));
} else if (p.getType().equals(Presence.Type.ERROR)) {
StanzaError error = p.getError();
- if (error != null && error.getCondition().equals(Condition.REMOTE_SERVER_NOT_FOUND)) {
- if (userService.setActiveStatusForJID(p.getFrom().toEscapedString(), UserService.ActiveStatus.Inactive)) {
- logger.info("{} is inactive now", p.getFrom());
+ if (error != null) {
+ var shouldDeactivate = error.getCondition().equals(Condition.REMOTE_SERVER_NOT_FOUND)
+ || error.getType().equals(StanzaError.Type.CANCEL);
+ if (shouldDeactivate) {
+ if (userService.setActiveStatusForJID(p.getFrom().toEscapedString(), UserService.ActiveStatus.Inactive)) {
+ logger.info("{} is inactive now", p.getFrom());
+ }
}
}
}