aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/entities
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-10-16 15:53:44 +0200
committeriNPUTmice <daniel@gultsch.de>2014-10-16 15:53:44 +0200
commitc1a55608df588df12b562598e985f427cdd9a9db (patch)
treecb3ba0df387fe8d5e32741bcba445bb48b66a1ab /src/eu/siacs/conversations/entities
parent6cfb14a2e40b0ecf912f13d2a84af24b56d607cc (diff)
log ending otr sessions on disconnect
Diffstat (limited to 'src/eu/siacs/conversations/entities')
-rw-r--r--src/eu/siacs/conversations/entities/Conversation.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/entities/Conversation.java b/src/eu/siacs/conversations/entities/Conversation.java
index 5f204ec27..e29981fd9 100644
--- a/src/eu/siacs/conversations/entities/Conversation.java
+++ b/src/eu/siacs/conversations/entities/Conversation.java
@@ -297,18 +297,23 @@ public class Conversation extends AbstractEntity {
}
}
- public void endOtrIfNeeded() {
+ public boolean endOtrIfNeeded() {
if (this.otrSession != null) {
if (this.otrSession.getSessionStatus() == SessionStatus.ENCRYPTED) {
try {
this.otrSession.endSession();
this.resetOtrSession();
+ return true;
} catch (OtrException e) {
this.resetOtrSession();
+ return false;
}
} else {
this.resetOtrSession();
+ return false;
}
+ } else {
+ return false;
}
}