diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-05-21 20:57:22 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-05-21 20:57:22 +0200 |
commit | 64b4d0115b677fa73b20c1389b24bbc9b1656221 (patch) | |
tree | e4b9a75e69b5d0189f9ce7b4d44cd2ffeddb0c48 /src/main/java | |
parent | ac3926cfbf29c6e1ca62a66f318efad666d17a19 (diff) |
prefetch omemo device lists only if muc has omemo enabled
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/services/XmppConnectionService.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java index ca07069b0..6ca1c80c4 100644 --- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java +++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java @@ -2429,7 +2429,7 @@ public class XmppConnectionService extends Service { @Override public void onIqPacketReceived(Account account, IqPacket packet) { - + final boolean omemoEnabled = conversation.getNextEncryption() == Message.ENCRYPTION_AXOLOTL; Element query = packet.query("http://jabber.org/protocol/muc#admin"); if (packet.getType() == IqPacket.TYPE.RESULT && query != null) { for (Element child : query.getChildren()) { @@ -2438,7 +2438,8 @@ public class XmppConnectionService extends Service { if (!user.realJidMatchesAccount()) { boolean isNew = conversation.getMucOptions().updateUser(user); Contact contact = user.getContact(); - if (isNew + if (omemoEnabled + && isNew && user.getRealJid() != null && (contact == null || !contact.mutualPresenceSubscription()) && axolotlService.hasEmptyDeviceList(user.getRealJid())) { |