aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/parser/MessageParser.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/eu/siacs/conversations/parser/MessageParser.java')
-rw-r--r--src/main/java/eu/siacs/conversations/parser/MessageParser.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
index 22446453..480adf25 100644
--- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java
+++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
@@ -4,7 +4,7 @@ import android.util.Log;
import android.util.Pair;
import de.tzur.conversations.Settings;
-import eu.siacs.conversations.crypto.PgpDecryptionService;
+
import net.java.otr4j.session.Session;
import net.java.otr4j.session.SessionStatus;
@@ -351,7 +351,7 @@ public class MessageParser extends AbstractParser implements
}
}
Message message;
- if (body != null && body.startsWith("?OTR")) {
+ if (body != null && body.startsWith("?OTR") && Config.supportOtr()) {
if (!isForwarded && !isTypeGroupChat && isProperlyAddressed) {
message = parseOtrChat(body, from, remoteMsgId, conversation);
if (message == null) {
@@ -361,9 +361,9 @@ public class MessageParser extends AbstractParser implements
Logging.d(Config.LOGTAG,account.getJid().toBareJid()+": ignoring OTR message from "+from+" isForwarded="+Boolean.toString(isForwarded)+", isProperlyAddressed="+Boolean.valueOf(isProperlyAddressed));
message = new Message(conversation, body, Message.ENCRYPTION_NONE, status);
}
- } else if (pgpEncrypted != null) {
+ } else if (pgpEncrypted != null && Config.supportOpenPgp()) {
message = new Message(conversation, pgpEncrypted, Message.ENCRYPTION_PGP, status);
- } else if (axolotlEncrypted != null) {
+ } else if (axolotlEncrypted != null && Config.supportOmemo()) {
message = parseAxolotlChat(axolotlEncrypted, from, remoteMsgId, conversation, status);
if (message == null) {
return;