This commit is contained in:
Peter Maquiran
2022-02-10 14:07:16 +01:00
parent a6823d9bae
commit 26a209502e
5 changed files with 122 additions and 128 deletions
+5
View File
@@ -677,6 +677,9 @@ updateRoomEventss(roomId, collection:string, funx: Function, ) {
this.wsMsgQueue[requestId] = {message, requestId, loginRequired}
} else {
let messageStr = JSON.stringify(message)
console.log('send', messageStr)
this.socket.send(messageStr)
}
return requestId
@@ -685,6 +688,8 @@ updateRoomEventss(roomId, collection:string, funx: Function, ) {
onmessage: async (event: any)=> {
const data = JSON.parse(event.data)
console.log('onmessage', data)
for (const [key, value] of Object.entries(this.wsCallbacks)) {
if(value.type== 'Onmessage') {
const dontRepeat = await value.funx(data)