Browse Source

Avoid sending 'auth fail' feedback twice.

JC Brand 8 years ago
parent
commit
d96bc6ebe4
1 changed files with 2 additions and 8 deletions
  1. 2 8
      src/converse-core.js

+ 2 - 8
src/converse-core.js

@@ -475,8 +475,8 @@
             } else if (status === Strophe.Status.AUTHENTICATING) {
                 converse.giveFeedback(__('Authenticating'));
             } else if (status === Strophe.Status.AUTHFAIL) {
-                converse.giveFeedback(__('Authentication failed.'), 'error');
-                converse.connection.disconnect(__('Authentication Failed'));
+                converse.giveFeedback(__('Authentication Failed'), 'error');
+                converse.connection.disconnect();
                 converse.setDisconnectionCause(status, condition, true);
             } else if (status === Strophe.Status.CONNFAIL) {
                 converse.giveFeedback(
@@ -486,12 +486,6 @@
                 converse.setDisconnectionCause(status, condition);
             } else if (status === Strophe.Status.DISCONNECTING) {
                 converse.setDisconnectionCause(status, condition);
-                if (condition) {
-                    converse.giveFeedback(
-                        __("Disconnected"), 'warn',
-                        __("The connection to the chat server has dropped")
-                    );
-                }
             }
         };