aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/services/XmppConnectionService.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-03-12 19:56:06 +0100
committerDaniel Gultsch <daniel@gultsch.de>2014-03-12 19:56:06 +0100
commitc67238562ae2228efbe96225b23b2a297aea8f2f (patch)
tree851aaafe35e6882a9501ea431507ab2f29f1356e /src/eu/siacs/conversations/services/XmppConnectionService.java
parent848fb2ec24f645d5f4b6e7e2348ddcf6a7dcdeee (diff)
fixed #9
Diffstat (limited to '')
-rw-r--r--src/eu/siacs/conversations/services/XmppConnectionService.java17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java
index 6d1ce784..2f19b100 100644
--- a/src/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/eu/siacs/conversations/services/XmppConnectionService.java
@@ -567,6 +567,7 @@ public class XmppConnectionService extends Service {
saveInDb = true;
addToConversation = true;
} else if (message.getEncryption() == Message.ENCRYPTION_PGP) {
+ message.getConversation().endOtrIfNeeded();
long keyId = message.getConversation().getContact()
.getPgpKeyId();
packet = new MessagePacket();
@@ -586,6 +587,7 @@ public class XmppConnectionService extends Service {
saveInDb = true;
addToConversation = true;
} else {
+ message.getConversation().endOtrIfNeeded();
// don't encrypt
if (message.getConversation().getMode() == Conversation.MODE_SINGLE) {
message.setStatus(Message.STATUS_SEND);
@@ -873,13 +875,7 @@ public class XmppConnectionService extends Service {
if (conversation.getMode() == Conversation.MODE_MULTI) {
leaveMuc(conversation);
} else {
- try {
- conversation.endOtrIfNeeded();
- } catch (OtrException e) {
- Log.d(LOGTAG,
- "error ending otr session for "
- + conversation.getName());
- }
+ conversation.endOtrIfNeeded();
}
this.databaseBackend.updateConversation(conversation);
this.conversations.remove(conversation);
@@ -1068,12 +1064,7 @@ public class XmppConnectionService extends Service {
if (conversation.getMode() == Conversation.MODE_MULTI) {
leaveMuc(conversation);
} else {
- try {
- conversation.endOtrIfNeeded();
- } catch (OtrException e) {
- Log.d(LOGTAG, "error ending otr session for "
- + conversation.getName());
- }
+ conversation.endOtrIfNeeded();
}
}
}