send message offline

This commit is contained in:
Peter Maquiran
2022-02-03 16:14:21 +01:00
parent 47fd5e3895
commit 33a2982805
2 changed files with 12 additions and 4 deletions
+9 -1
View File
@@ -14,7 +14,15 @@ export class WsChatService {
isLogin = false;
loginResponse = {}
constructor() {}
constructor() {
window.addEventListener('online', ()=>{
this.connect()
this.login()
});
}
connect() {
// dont connect if is already connected