mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-16 12:12: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,9 +340,15 @@ public final class AccountManager extends Manager {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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 ServiceDiscoveryManager.getInstanceFor(connection).serverSupportsFeature(Registration.NAMESPACE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the account registration info from the server.
|
* Gets the account registration info from the server.
|
||||||
* @throws XMPPErrorException
|
* @throws XMPPErrorException
|
||||||
|
|
Loading…
Reference in a new issue