add more logging to caps fetching
This commit is contained in:
parent
8059aa7b0d
commit
971bb60f42
|
@ -2778,6 +2778,7 @@ public class XmppConnectionService extends Service {
|
|||
updateConversationUi();
|
||||
}
|
||||
}
|
||||
|
||||
private void fetchConferenceMembers(final Conversation conversation) {
|
||||
final Account account = conversation.getAccount();
|
||||
final AxolotlService axolotlService = account.getAxolotlService();
|
||||
|
@ -3304,7 +3305,7 @@ public class XmppConnectionService extends Service {
|
|||
}
|
||||
|
||||
public void createMessageAsync(final Message message) {
|
||||
mDatabaseWriterExecutor.execute(()-> databaseBackend.createMessage(message));
|
||||
mDatabaseWriterExecutor.execute(() -> databaseBackend.createMessage(message));
|
||||
}
|
||||
|
||||
public void updateMessage(Message message, String uuid) {
|
||||
|
@ -4444,13 +4445,16 @@ public class XmppConnectionService extends Service {
|
|||
|
||||
public void fetchCaps(Account account, final Jid jid, final Presence presence) {
|
||||
final Pair<String, String> key = new Pair<>(presence.getHash(), presence.getVer());
|
||||
ServiceDiscoveryResult disco = getCachedServiceDiscoveryResult(key);
|
||||
final ServiceDiscoveryResult disco = getCachedServiceDiscoveryResult(key);
|
||||
if (disco != null) {
|
||||
presence.setServiceDiscoveryResult(disco);
|
||||
} else {
|
||||
if (!account.inProgressDiscoFetches.contains(key)) {
|
||||
if (account.inProgressDiscoFetches.contains(key)) {
|
||||
Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": skipping duplicate disco request for " + key.second + " to " + jid);
|
||||
return;
|
||||
}
|
||||
account.inProgressDiscoFetches.add(key);
|
||||
IqPacket request = new IqPacket(IqPacket.TYPE.GET);
|
||||
final IqPacket request = new IqPacket(IqPacket.TYPE.GET);
|
||||
request.setTo(jid);
|
||||
final String node = presence.getNode();
|
||||
final String ver = presence.getVer();
|
||||
|
@ -4468,12 +4472,13 @@ public class XmppConnectionService extends Service {
|
|||
} else {
|
||||
Log.d(Config.LOGTAG, a.getJid().asBareJid() + ": mismatch in caps for contact " + jid + " " + presence.getVer() + " vs " + discoveryResult.getVer());
|
||||
}
|
||||
} else {
|
||||
Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": unable to fetch caps from " + jid);
|
||||
}
|
||||
a.inProgressDiscoFetches.remove(key);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void injectServiceDiscoveryResult(Roster roster, String hash, String ver, ServiceDiscoveryResult disco) {
|
||||
for (final Contact contact : roster.getContacts()) {
|
||||
|
|
Loading…
Reference in a new issue