improve console.log

This commit is contained in:
Peter Maquiran
2022-01-10 12:23:01 +01:00
parent 77a8bfffa1
commit f85ea7e2bc
@@ -138,6 +138,9 @@ class _RocketChatClientService {
createRoom() {} createRoom() {}
getRooms() { getRooms() {
const conditions = this.attemptRequestQueue({},{methodName: 'getRooms'})
if(conditions == false) { return new Promise((resolve, reject) => { reject('no error')}); }
const requestId = uuidv4() const requestId = uuidv4()
const request = { const request = {
@@ -242,7 +245,7 @@ class _RocketChatClientService {
console.log('save msgQueue') console.log('save msgQueue')
this.wsMsgQueue.push({message, requestId}) this.wsMsgQueue.push({message, requestId})
} else { } else {
console.log('send rocket chat', message) console.log('send to rocket chat', message)
let messageStr = JSON.stringify(message) let messageStr = JSON.stringify(message)
this.socket.send(messageStr) this.socket.send(messageStr)
} }