diff options
author | Christian Schneppe <christian@pix-art.de> | 2019-02-08 12:16:45 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2019-02-08 12:16:45 +0100 |
commit | aa4117c935ed98c856242332d23d19a007fcb48b (patch) | |
tree | f1600496c326c55f877003acd26393edb9669abc /src/main/java/de/pixart/messenger/crypto | |
parent | 59836f5d429145f460b07dbf0e5095780606f2a6 (diff) |
hide lock icon in channels; modify muc user context
Diffstat (limited to 'src/main/java/de/pixart/messenger/crypto')
-rw-r--r-- | src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java b/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java index 09b3b1320..885db348d 100644 --- a/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java +++ b/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java @@ -840,40 +840,6 @@ public class AxolotlService implements OnAdvancedStreamFeaturesLoaded { }); } - public enum AxolotlCapability { - FULL, - MISSING_PRESENCE, - MISSING_KEYS, - WRONG_CONFIGURATION, - NO_MEMBERS - } - - public boolean isConversationAxolotlCapable(Conversation conversation) { - return conversation.isSingleOrPrivateAndNonAnonymous(); - } - - public Pair<AxolotlCapability, Jid> isConversationAxolotlCapableDetailed(Conversation conversation) { - if (conversation.isSingleOrPrivateAndNonAnonymous()) { - final List<Jid> jids = getCryptoTargets(conversation); - for (Jid jid : jids) { - if (!hasAny(jid) && (!deviceIds.containsKey(jid) || deviceIds.get(jid).isEmpty())) { - if (conversation.getAccount().getRoster().getContact(jid).mutualPresenceSubscription()) { - return new Pair<>(AxolotlCapability.MISSING_KEYS, jid); - } else { - return new Pair<>(AxolotlCapability.MISSING_PRESENCE, jid); - } - } - } - if (jids.size() > 0) { - return new Pair<>(AxolotlCapability.FULL, null); - } else { - return new Pair<>(AxolotlCapability.NO_MEMBERS, null); - } - } else { - return new Pair<>(AxolotlCapability.WRONG_CONFIGURATION, null); - } - } - public List<Jid> getCryptoTargets(Conversation conversation) { final List<Jid> jids; if (conversation.getMode() == Conversation.MODE_SINGLE) { |