diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-04-29 15:52:55 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-04-29 15:52:55 +0200 |
commit | d4af9d6b87cfbddf1ae920e98766c924a4625495 (patch) | |
tree | 017ce147a20018c5fd8df800745f88ff18c3be0c /src/main/java | |
parent | 500d4294b589c0ba78e30a34a2854d611a2d5d73 (diff) |
some OTR fixes
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/de/pixart/messenger/entities/Conversation.java | 4 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ConversationsActivity.java | 6 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Conversation.java b/src/main/java/de/pixart/messenger/entities/Conversation.java index 705b14cc3..a6c79050c 100644 --- a/src/main/java/de/pixart/messenger/entities/Conversation.java +++ b/src/main/java/de/pixart/messenger/entities/Conversation.java @@ -768,8 +768,10 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl defaultEncryption = Message.ENCRYPTION_NONE; } int encryption = this.getIntAttribute(ATTRIBUTE_NEXT_ENCRYPTION, defaultEncryption); - if (encryption == Message.ENCRYPTION_OTR || encryption < 0) { + if (encryption < 0) { return defaultEncryption; + } else if (encryption == Message.ENCRYPTION_OTR) { + return encryption; } else { return encryption; } diff --git a/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java b/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java index 5deea0f6a..06ab8ec89 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationsActivity.java @@ -811,15 +811,9 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio intent.putExtra("contact", conversation.getContact().getJid().asBareJid().toString()); intent.putExtra(EXTRA_ACCOUNT, conversation.getAccount().getJid().asBareJid().toString()); switch (menuItem.getItemId()) { - case R.id.scan_fingerprint: - intent.putExtra("mode", VerifyOTRActivity.MODE_SCAN_FINGERPRINT); - break; case R.id.ask_question: intent.putExtra("mode", VerifyOTRActivity.MODE_ASK_QUESTION); break; - case R.id.manual_verification: - intent.putExtra("mode", VerifyOTRActivity.MODE_MANUAL_VERIFICATION); - break; } startActivity(intent); return true; |