aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/crypto
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-12-16 23:02:54 +0100
committerChristian Schneppe <christian@pix-art.de>2017-12-16 23:02:54 +0100
commit6da8c6ef3ba91c4ab22dad97c14e0a6f390cb002 (patch)
tree8b5d90331dab6578bc46f221c7440ddb05c5339a /src/main/java/de/pixart/messenger/crypto
parentd7871f90332adc106e50d5f36e454146105ef60f (diff)
fixup for pep omemo notification dedup
Diffstat (limited to 'src/main/java/de/pixart/messenger/crypto')
-rw-r--r--src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java10
1 files changed, 6 insertions, 4 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 f81903a28..a090b72d1 100644
--- a/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java
+++ b/src/main/java/de/pixart/messenger/crypto/axolotl/AxolotlService.java
@@ -389,11 +389,13 @@ public class AxolotlService implements OnAdvancedStreamFeaturesLoaded {
public void registerDevices(final Jid jid, @NonNull final Set<Integer> deviceIds) {
final int hash = deviceIds.hashCode();
final boolean me = jid.toBareJid().equals(account.getJid().toBareJid());
- if (me && hash == this.lastDeviceListNotificationHash) {
- Log.d(Config.LOGTAG, account.getJid().toBareJid() + ": ignoring duplicate own device id list");
- return;
+ if (me) {
+ if (hash == this.lastDeviceListNotificationHash) {
+ Log.d(Config.LOGTAG, account.getJid().toBareJid() + ": ignoring duplicate own device id list");
+ return;
+ }
+ this.lastDeviceListNotificationHash = hash;
}
- this.lastDeviceListNotificationHash = hash;
boolean needsPublishing = me && !deviceIds.contains(getOwnDeviceId());
if (me) {
deviceIds.remove(getOwnDeviceId());