mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-28 11:42:15 -05:00
load axolotl session cache on first device update
This commit is contained in:
parent
a83aae341f
commit
e9e31b1c9b
@ -322,6 +322,7 @@ public class AxolotlService implements OnAdvancedStreamFeaturesLoaded {
|
|||||||
setTrustOnSessions(jid, newDevices, XmppAxolotlSession.Trust.INACTIVE_UNTRUSTED,
|
setTrustOnSessions(jid, newDevices, XmppAxolotlSession.Trust.INACTIVE_UNTRUSTED,
|
||||||
XmppAxolotlSession.Trust.UNTRUSTED);
|
XmppAxolotlSession.Trust.UNTRUSTED);
|
||||||
this.deviceIds.put(jid, deviceIds);
|
this.deviceIds.put(jid, deviceIds);
|
||||||
|
findDevicesWithoutSession(jid);
|
||||||
mXmppConnectionService.keyStatusUpdated(null);
|
mXmppConnectionService.keyStatusUpdated(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -697,8 +698,11 @@ public class AxolotlService implements OnAdvancedStreamFeaturesLoaded {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Set<AxolotlAddress> findDevicesWithoutSession(final Conversation conversation) {
|
public Set<AxolotlAddress> findDevicesWithoutSession(final Conversation conversation) {
|
||||||
Log.d(Config.LOGTAG, AxolotlService.getLogprefix(account) + "Finding devices without session for " + conversation.getContact().getJid().toBareJid());
|
return findDevicesWithoutSession(conversation.getContact().getJid().toBareJid());
|
||||||
Jid contactJid = 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<>();
|
Set<AxolotlAddress> addresses = new HashSet<>();
|
||||||
if (deviceIds.get(contactJid) != null) {
|
if (deviceIds.get(contactJid) != null) {
|
||||||
for (Integer foreignId : this.deviceIds.get(contactJid)) {
|
for (Integer foreignId : this.deviceIds.get(contactJid)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user