From 0e5a0a07fd32d185d2d4c43df9494fafcace9208 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Sat, 6 Sep 2014 18:21:31 +0200 Subject: made otr a little bit more solid when there is no presence subscription --- src/eu/siacs/conversations/services/XmppConnectionService.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/eu/siacs/conversations/services/XmppConnectionService.java') diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java index 9e1717514..da7ffb4dd 100644 --- a/src/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/eu/siacs/conversations/services/XmppConnectionService.java @@ -516,7 +516,7 @@ public class XmppConnectionService extends Service { if (message.getEncryption() == Message.ENCRYPTION_OTR) { if (!conv.hasValidOtrSession() && (message.getPresence() != null)) { - conv.startOtrSession(getApplicationContext(), + conv.startOtrSession(this, message.getPresence(), true); message.setStatus(Message.STATUS_WAITING); } else if (conv.hasValidOtrSession() @@ -536,7 +536,7 @@ public class XmppConnectionService extends Service { if (message.getEncryption() == Message.ENCRYPTION_OTR) { if (!conv.hasValidOtrSession() && (message.getPresence() != null)) { - conv.startOtrSession(getApplicationContext(), + conv.startOtrSession(this, message.getPresence(), true); message.setStatus(Message.STATUS_WAITING); } else if (conv.hasValidOtrSession() @@ -577,7 +577,7 @@ public class XmppConnectionService extends Service { .getUserID()); } else if (!conv.hasValidOtrSession() && message.getPresence() != null) { - conv.startOtrSession(getApplicationContext(), + conv.startOtrSession(this, message.getPresence(), false); } } @@ -617,13 +617,13 @@ public class XmppConnectionService extends Service { if ((message.getPresence() != null) && (presences.has(message.getPresence()))) { message.getConversation().startOtrSession( - getApplicationContext(), message.getPresence(), + this, message.getPresence(), true); } else { if (presences.size() == 1) { String presence = presences.asStringArray()[0]; message.getConversation().startOtrSession( - getApplicationContext(), presence, true); + this, presence, true); } } } else { -- cgit v1.2.3