aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDanny van Heumen <danny@dannyvanheumen.nl>2015-02-21 17:29:33 +0100
committerDanny van Heumen <danny@dannyvanheumen.nl>2015-02-21 17:59:07 +0100
commitb05ec79695e1fd4bd31d8963a2b808eb84fd473a (patch)
tree4bc97b1c664add94d3f7984f70a80a99e08c39e0 /src
parent26e13d41d815890fbbb311094fe05841e498a6fd (diff)
downloadjitsi-b05ec79695e1fd4bd31d8963a2b808eb84fd473a.zip
jitsi-b05ec79695e1fd4bd31d8963a2b808eb84fd473a.tar.gz
jitsi-b05ec79695e1fd4bd31d8963a2b808eb84fd473a.tar.bz2
Let every message pass through to otr4j, since otr4j will already correctly handle (not) transforming if session state is PlainText.
Diffstat (limited to 'src')
-rw-r--r--src/net/java/sip/communicator/plugin/otr/OtrTransformLayer.java31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/net/java/sip/communicator/plugin/otr/OtrTransformLayer.java b/src/net/java/sip/communicator/plugin/otr/OtrTransformLayer.java
index 7c94eac..8d653a6 100644
--- a/src/net/java/sip/communicator/plugin/otr/OtrTransformLayer.java
+++ b/src/net/java/sip/communicator/plugin/otr/OtrTransformLayer.java
@@ -6,7 +6,6 @@
*/
package net.java.sip.communicator.plugin.otr;
-import net.java.otr4j.*;
import net.java.otr4j.io.*;
import net.java.sip.communicator.plugin.otr.OtrContactManager.OtrContact;
import net.java.sip.communicator.service.protocol.*;
@@ -29,16 +28,6 @@ public class OtrTransformLayer
OtrContact otrContact =
OtrContactManager.getOtrContact(contact, evt.getContactResource());
- OtrPolicy policy = OtrActivator.scOtrEngine.getContactPolicy(contact);
- ScSessionStatus sessionStatus =
- OtrActivator.scOtrEngine.getSessionStatus(otrContact);
- // If OTR is disabled and we are not over an encrypted session, don't
- // process anything.
- if (!policy.getEnableManual()
- && sessionStatus != ScSessionStatus.ENCRYPTED
- && sessionStatus != ScSessionStatus.FINISHED)
- return evt;
-
if (OtrActivator.scOtrEngine.isMessageUIDInjected(evt
.getSourceMessage().getMessageUID()))
// If this is a message otr4j injected earlier, don't display it,
@@ -68,16 +57,6 @@ public class OtrTransformLayer
OtrContact otrContact =
OtrContactManager.getOtrContact(contact, evt.getContactResource());
- OtrPolicy policy = OtrActivator.scOtrEngine.getContactPolicy(contact);
- ScSessionStatus sessionStatus =
- OtrActivator.scOtrEngine.getSessionStatus(otrContact);
- // If OTR is disabled and we are not over an encrypted session, don't
- // process anything.
- if (!policy.getEnableManual()
- && sessionStatus != ScSessionStatus.ENCRYPTED
- && sessionStatus != ScSessionStatus.FINISHED)
- return new MessageDeliveredEvent[] {evt};
-
// If this is a message otr4j injected earlier, return the event as is.
if (OtrActivator.scOtrEngine.isMessageUIDInjected(evt
.getSourceMessage().getMessageUID()))
@@ -138,16 +117,6 @@ public class OtrTransformLayer
OtrContact otrContact =
OtrContactManager.getOtrContact(contact, evt.getContactResource());
- OtrPolicy policy = OtrActivator.scOtrEngine.getContactPolicy(contact);
- ScSessionStatus sessionStatus =
- OtrActivator.scOtrEngine.getSessionStatus(otrContact);
- // If OTR is disabled and we are not over an encrypted session, don't
- // process anything.
- if (!policy.getEnableManual()
- && sessionStatus != ScSessionStatus.ENCRYPTED
- && sessionStatus != ScSessionStatus.FINISHED)
- return evt;
-
// Process the incoming message.
String msgContent = evt.getSourceMessage().getContent();