diff --git a/src/components/views/settings/SetIdServer.js b/src/components/views/settings/SetIdServer.js
index 9ef5fb295e..8359c09d87 100644
--- a/src/components/views/settings/SetIdServer.js
+++ b/src/components/views/settings/SetIdServer.js
@@ -249,20 +249,55 @@ export default class SetIdServer extends React.Component {
};
async _showServerChangeWarning({ title, unboundMessage, button }) {
- const threepids = await getThreepidsWithBindStatus(MatrixClientPeg.get());
+ const { currentClientIdServer } = this.state;
+
+ let threepids = [];
+ let currentServerReachable = true;
+ try {
+ threepids = await getThreepidsWithBindStatus(MatrixClientPeg.get());
+ } catch (e) {
+ currentServerReachable = false;
+ console.warn(
+ `Unable to reach identity server at ${currentClientIdServer} to check ` +
+ `for 3PIDs during IS change flow`,
+ );
+ console.warn(e);
+ }
const boundThreepids = threepids.filter(tp => tp.bound);
let message;
let danger = false;
- if (boundThreepids.length) {
+ const messageElements = {
+ idserver: sub => {abbreviateUrl(currentClientIdServer)},
+ b: sub => {sub},
+ };
+ if (!currentServerReachable) {
+ message =
+
{_t(
+ "You should remove your personal data from identity server " +
+ " before disconnecting. Unfortunately, identity server " +
+ " is currently offline or cannot be reached.",
+ {}, messageElements,
+ )}
+
{_t("You should:")}
+
+ - {_t(
+ "check your browser plugins for anything that might block " +
+ "the identity server (such as Privacy Badger)",
+ )}
+ - {_t("contact the administrators of identity server ", {}, {
+ idserver: messageElements.idserver,
+ })}
+ - {_t("wait and try again later")}
+
+
;
+ danger = true;
+ button = _t("Disconnect anyway");
+ } else if (boundThreepids.length) {
message =
{_t(
"You are still sharing your personal data on the identity " +
- "server .", {},
- {
- idserver: sub => {abbreviateUrl(this.state.currentClientIdServer)},
- b: sub => {sub},
- },
+ "server .", {}, messageElements,
)}
{_t(
"We recommend that you remove your email addresses and phone numbers " +
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index f524a22d4b..2b7ef28ace 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -568,9 +568,14 @@
"Disconnect identity server": "Disconnect identity server",
"Disconnect from the identity server ?": "Disconnect from the identity server ?",
"Disconnect": "Disconnect",
+ "You should remove your personal data from identity server before disconnecting. Unfortunately, identity server is currently offline or cannot be reached.": "You should remove your personal data from identity server before disconnecting. Unfortunately, identity server is currently offline or cannot be reached.",
+ "You should:": "You should:",
+ "check your browser plugins for anything that might block the identity server (such as Privacy Badger)": "check your browser plugins for anything that might block the identity server (such as Privacy Badger)",
+ "contact the administrators of identity server ": "contact the administrators of identity server ",
+ "wait and try again later": "wait and try again later",
+ "Disconnect anyway": "Disconnect anyway",
"You are still sharing your personal data on the identity server .": "You are still sharing your personal data on the identity server .",
"We recommend that you remove your email addresses and phone numbers from the identity server before disconnecting.": "We recommend that you remove your email addresses and phone numbers from the identity server before disconnecting.",
- "Disconnect anyway": "Disconnect anyway",
"Go back": "Go back",
"Identity Server (%(server)s)": "Identity Server (%(server)s)",
"You are currently using to discover and be discoverable by existing contacts you know. You can change your identity server below.": "You are currently using to discover and be discoverable by existing contacts you know. You can change your identity server below.",