getNextEncryption does not honor ENCYPTION_MASK (#2899)

This commit is contained in:
ChaosKid42 2018-03-26 12:44:21 +02:00 committed by Daniel Gultsch
parent 1749009d10
commit 536149723e

View file

@ -593,6 +593,9 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
public int getNextEncryption() { public int getNextEncryption() {
final int defaultEncryption; final int defaultEncryption;
if (!Config.supportOmemo() && !Config.supportOpenPgp()) {
return Message.ENCRYPTION_NONE;
}
AxolotlService axolotlService = account.getAxolotlService(); AxolotlService axolotlService = account.getAxolotlService();
if (contactJid.asBareJid().equals(Config.BUG_REPORTS)) { if (contactJid.asBareJid().equals(Config.BUG_REPORTS)) {
defaultEncryption = Message.ENCRYPTION_NONE; defaultEncryption = Message.ENCRYPTION_NONE;