remove console logs

This commit is contained in:
Peter Maquiran
2023-09-27 08:44:35 +01:00
parent 1f2827680d
commit b46d179dfe
4 changed files with 57 additions and 71 deletions
+25 -6
View File
@@ -252,6 +252,7 @@ export class MessageService {
functionTimer = null;
functionTimer2 = null;
async sendRequestAttachment() {
@@ -295,7 +296,11 @@ export class MessageService {
return uploadSuccessfully
}
sendToRocketChatAttemp = 0
async sendRequest(params) {
this.sendToRocketChatAttemp++;
if(params?.attachments) {
if(params?.attachments[0]?.image_url) {
delete params?.attachments[0]?.image_url
@@ -320,6 +325,7 @@ export class MessageService {
}
} else {
// console.log('online')
this.RochetChatConnectorService.send(params).then(
(ChatMessage: any) => {
@@ -336,16 +342,16 @@ export class MessageService {
}
this.functionTimer = setTimeout(() => {
//console.log('functionTimer')
this.RochetChatConnectorService.registerCallback({
type:'Onmessage',
key:'ping-pong-message',
funx:(message: any) => {
// clearTimeout(this.functionTimer2);
if(message.msg == "ping") {
if(this.sendAttempt >= 3) {
this.manualRetry = true
} else {
this.send()
}
this.sendRequest(params)
return true
}
@@ -353,11 +359,24 @@ export class MessageService {
}
})
// this.functionTimer2 = setTimeout(() => {
// console.log('set to callback')
// this.RochetChatConnectorService.registerCallback({
// type: 'reConnect',
// funx: async ()=> {
// this.sendRequest(params)
// return true
// }
// })
// }, 4000)
this.RochetChatConnectorService.wsSend({message:{msg:"pong"}, loginRequired: false})
}, 3000)
}, 5000)
} else {
// console.log('offline')
this.RochetChatConnectorService.registerCallback({
type: 'reConnect',
funx: async ()=> {