aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r--src/main/java/de/pixart/messenger/services/XmppConnectionService.java13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
index ba471990e..230a3af91 100644
--- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
+++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
@@ -195,15 +195,12 @@ public class XmppConnectionService extends Service {
sendUnsentMessages(conversation);
}
} else {
- if (contact.getPresences().size() >= 1) {
- if (conversation.hasValidOtrSession()) {
- String otrResource = conversation.getOtrSession().getSessionID().getUserID();
- if (!(Arrays.asList(contact.getPresences().toResourceArray()).contains(otrResource))) {
- conversation.endOtrIfNeeded();
- }
+ //check if the resource we are haveing a conversation with is still online
+ if (conversation.hasValidOtrSession()) {
+ String otrResource = conversation.getOtrSession().getSessionID().getUserID();
+ if (!(Arrays.asList(contact.getPresences().toResourceArray()).contains(otrResource))) {
+ conversation.endOtrIfNeeded();
}
- } else {
- conversation.endOtrIfNeeded();
}
}
}