This commit is contained in:
Peter Maquiran
2022-02-09 14:07:34 +01:00
parent 012c5ccce6
commit 9a35ea30f0
6 changed files with 26 additions and 31 deletions
+2 -1
View File
@@ -614,7 +614,6 @@ updateRoomEventss(roomId, collection:string, funx: Function, ) {
let id = params.requestId || params.key || uuidv4()
this.wsCallbacks[id] = params
this.n++
console.log('n', this.n)
return id
},
connect:()=> {
@@ -680,6 +679,8 @@ updateRoomEventss(roomId, collection:string, funx: Function, ) {
onmessage: async (event: any)=> {
const data = JSON.parse(event.data)
console.log('data', data)
for (const [key, value] of Object.entries(this.wsCallbacks)) {
if(value.type== 'Onmessage') {
const dontRepeat = await value.funx(data)