Commit d96bc6eb authored by JC Brand's avatar JC Brand

Avoid sending 'auth fail' feedback twice.

parent af42bc06
...@@ -475,8 +475,8 @@ ...@@ -475,8 +475,8 @@
} else if (status === Strophe.Status.AUTHENTICATING) { } else if (status === Strophe.Status.AUTHENTICATING) {
converse.giveFeedback(__('Authenticating')); converse.giveFeedback(__('Authenticating'));
} else if (status === Strophe.Status.AUTHFAIL) { } else if (status === Strophe.Status.AUTHFAIL) {
converse.giveFeedback(__('Authentication failed.'), 'error'); converse.giveFeedback(__('Authentication Failed'), 'error');
converse.connection.disconnect(__('Authentication Failed')); converse.connection.disconnect();
converse.setDisconnectionCause(status, condition, true); converse.setDisconnectionCause(status, condition, true);
} else if (status === Strophe.Status.CONNFAIL) { } else if (status === Strophe.Status.CONNFAIL) {
converse.giveFeedback( converse.giveFeedback(
...@@ -486,12 +486,6 @@ ...@@ -486,12 +486,6 @@
converse.setDisconnectionCause(status, condition); converse.setDisconnectionCause(status, condition);
} else if (status === Strophe.Status.DISCONNECTING) { } else if (status === Strophe.Status.DISCONNECTING) {
converse.setDisconnectionCause(status, condition); converse.setDisconnectionCause(status, condition);
if (condition) {
converse.giveFeedback(
__("Disconnected"), 'warn',
__("The connection to the chat server has dropped")
);
}
} }
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment