mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
add http interceptor
This commit is contained in:
@@ -5,6 +5,7 @@ import { deepFind } from 'src/plugin/deep'
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { chatHistory, Rooms } from 'src/app/models/chatMethod';
|
||||
import { BackgroundService } from '../background.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -14,7 +15,7 @@ export class RochetChatConnectorService {
|
||||
isLogin = false;
|
||||
loginResponse = {}
|
||||
|
||||
constructor() {
|
||||
constructor(private backgroundservice: BackgroundService,) {
|
||||
}
|
||||
|
||||
connect() {
|
||||
@@ -752,6 +753,7 @@ export class RochetChatConnectorService {
|
||||
},
|
||||
onopen: async ()=> {
|
||||
this.ws.connected = true
|
||||
this.backgroundservice.online();
|
||||
|
||||
setTimeout(()=>{
|
||||
this.ws.wsMsgQueue()
|
||||
@@ -804,6 +806,9 @@ export class RochetChatConnectorService {
|
||||
},
|
||||
|
||||
onmessage: async (event: any)=> {
|
||||
|
||||
this.backgroundservice.online();
|
||||
|
||||
const data = JSON.parse(event.data)
|
||||
|
||||
for (const [key, value] of Object.entries(this.wsCallbacks)) {
|
||||
|
||||
Reference in New Issue
Block a user