aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-10-17 14:44:59 +0200
committerDaniel Gultsch <daniel@gultsch.de>2015-10-17 14:44:59 +0200
commite9e31b1c9bb8c0e1e78207b843c5799b98f06cdd (patch)
treed78b411e451504b13297eacf631b3b037fa942e1
parenta83aae341fc681edc43928af1e37d4bb67e733d8 (diff)
load axolotl session cache on first device update
-rw-r--r--src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java b/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java
index d539e078..753de5a6 100644
--- a/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java
+++ b/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java
@@ -322,6 +322,7 @@ public class AxolotlService implements OnAdvancedStreamFeaturesLoaded {
setTrustOnSessions(jid, newDevices, XmppAxolotlSession.Trust.INACTIVE_UNTRUSTED,
XmppAxolotlSession.Trust.UNTRUSTED);
this.deviceIds.put(jid, deviceIds);
+ findDevicesWithoutSession(jid);
mXmppConnectionService.keyStatusUpdated(null);
}
@@ -697,8 +698,11 @@ public class AxolotlService implements OnAdvancedStreamFeaturesLoaded {
}
public Set<AxolotlAddress> findDevicesWithoutSession(final Conversation conversation) {
- Log.d(Config.LOGTAG, AxolotlService.getLogprefix(account) + "Finding devices without session for " + conversation.getContact().getJid().toBareJid());
- Jid contactJid = conversation.getContact().getJid().toBareJid();
+ return findDevicesWithoutSession(conversation.getContact().getJid().toBareJid());
+ }
+
+ public Set<AxolotlAddress> findDevicesWithoutSession(final Jid contactJid) {
+ Log.d(Config.LOGTAG, AxolotlService.getLogprefix(account) + "Finding devices without session for " + contactJid);
Set<AxolotlAddress> addresses = new HashSet<>();
if (deviceIds.get(contactJid) != null) {
for (Integer foreignId : this.deviceIds.get(contactJid)) {