소스 검색

Avoid sending 'auth fail' feedback twice.

JC Brand 8 년 전
부모
커밋
d96bc6ebe4
1개의 변경된 파일2개의 추가작업 그리고 8개의 파일을 삭제
  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")
-                    );
-                }
             }
         };