Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip xmlrpc discovery when jetpack ready #68

Merged
merged 1 commit into from
Oct 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -428,14 +428,21 @@ private void handleConnectSiteInfoForWoo(ConnectSiteInfoPayload siteInfo) {
endProgressIfNeeded();
// Not a WordPress site
mLoginListener.handleSiteAddressError(siteInfo);
} else if (siteInfo.hasJetpack && siteInfo.isJetpackConnected && siteInfo.isJetpackActive) {
malinajirka marked this conversation as resolved.
Show resolved Hide resolved
endProgressIfNeeded();
mLoginListener.gotConnectedSiteInfo(
mConnectSiteInfoUrl,
mConnectSiteInfoUrlRedirect,
mConnectSiteInfoCalculatedHasJetpack
);
} else {
/**
* Jetpack internally uses xml-rpc protocol. Due to a bug on the API, when jetpack is
* setup and connected to a .com account `isJetpackConnected` returns false when xml-rpc
* is disabled.
* This is causing issues to the client apps as they can't differentiate between
* "xml-rpc disabled" and "jetpack not connected" states. Therefore, the login flow
* library always needs to invoke "xml-rpc discovery" to check if xml-rpc is accessible.
* library needs to invoke "xml-rpc discovery" to check if xml-rpc is accessible.
*/
initiateDiscovery();
}
Expand Down