Explorar o código

Report disconnection cause

Otherwise the user sees no message when trying to log in with the wrong password.
JC Brand hai 1 mes
pai
achega
8f3317dc77
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/headless/shared/connection/index.js

+ 1 - 1
src/headless/shared/connection/index.js

@@ -280,7 +280,7 @@ export class Connection extends Strophe.Connection {
     }
 
     async finishDisconnection () {
-        this.setConnectionStatus(Strophe.Status.DISCONNECTED);
+        this.setConnectionStatus(Strophe.Status.DISCONNECTED, this.disconnection_reason);
         const { api } = _converse;
         // Properly tear down the session so that it's possible to manually connect again.
         log.debug('DISCONNECTED');