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:
parent
24bbe63da1
commit
7167a55f81
1 changed files with 7 additions and 1 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue