1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-26 14:02:06 +01:00

AccountManager: Don't fallback to disco#info if not authenticated

This commit is contained in:
Florian Schmaus 2017-01-06 14:49:58 +01:00
parent 24bbe63da1
commit 7167a55f81

View file

@ -340,7 +340,13 @@ public final class AccountManager extends Manager {
return true; return true;
} }
return ServiceDiscoveryManager.getInstanceFor(connection).serverSupportsFeature(Registration.NAMESPACE); // Fallback to disco#info only if this connection is authenticated, as otherwise we won't have an full JID and
// won't be able to do IQs.
if (connection.isAuthenticated()) {
return ServiceDiscoveryManager.getInstanceFor(connection).serverSupportsFeature(Registration.NAMESPACE);
}
return false;
} }
/** /**