Parcourir la source

Report disconnection cause

Otherwise the user sees no message when trying to log in with the wrong password.
JC Brand il y a 1 mois
Parent
commit
8f3317dc77
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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');