diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-02-16 09:15:41 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-02-16 09:15:41 +0100 |
commit | 0ca4a33bfb76d63a3c2d4447643a5bd90ac5315f (patch) | |
tree | bcebfb79f37f966fb2bc867e6da3536e6b34f1b0 /src/main/java/eu/siacs/conversations/entities | |
parent | c0b3a3ff0c32c8025174ebb92fbcf4a7fc67f497 (diff) |
added some OTR logging
Diffstat (limited to 'src/main/java/eu/siacs/conversations/entities')
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Conversation.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Conversation.java b/src/main/java/eu/siacs/conversations/entities/Conversation.java index a0600d130..c72ac09e3 100644 --- a/src/main/java/eu/siacs/conversations/entities/Conversation.java +++ b/src/main/java/eu/siacs/conversations/entities/Conversation.java @@ -517,15 +517,18 @@ public class Conversation extends AbstractEntity implements Blockable { return mSmp; } - public void startOtrIfNeeded() { - if (this.otrSession != null - && this.otrSession.getSessionStatus() != SessionStatus.ENCRYPTED) { + public boolean startOtrIfNeeded() { + if (this.otrSession != null && this.otrSession.getSessionStatus() != SessionStatus.ENCRYPTED) { try { this.otrSession.startSession(); + return true; } catch (OtrException e) { this.resetOtrSession(); + return false; } - } + } else { + return true; + } } public boolean endOtrIfNeeded() { |