Merge branch 'feature/websocket' of https://bitbucket.org/equilibriumito/gabinete-digital into feature/websocket

This commit is contained in:
tiago.kayaya
2022-01-13 21:24:58 +01:00
3 changed files with 10 additions and 8 deletions
+8 -5
View File
@@ -61,12 +61,15 @@ export class WsChatService {
this.ws.registerCallback({type:'Onmessage', funx:(message)=>{
if(message.id == requestId ) { // same request send
if(message.result.token) {
this.isLogin = true
if(message.result) {
if(message.result.token) {
this.isLogin = true
this.ws.wsMsgQueue()
this.ws.wsMsgQueue()
resolve(message)
resolve(message)
}
} else {
this.isLogin = false
reject(message)
@@ -174,7 +177,7 @@ export class WsChatService {
});
}
temporaryStatus(status: 'online' | 'busy' | 'away' | 'offline') {
setStatus(status: 'online' | 'busy' | 'away' | 'offline') {
const requestId = uuidv4()