mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
remove promise bug
This commit is contained in:
@@ -166,7 +166,11 @@ export class MessageService {
|
||||
|
||||
let uploadSuccessfully = false
|
||||
if(this.hasSendAttachment == false) {
|
||||
uploadSuccessfully = await this.NfService.beforeSendAttachment(this)
|
||||
try {
|
||||
uploadSuccessfully = await this.NfService.beforeSendAttachment(this)
|
||||
} catch (error) {
|
||||
console.error('beforeSendAttachment uploadSuccessfully',error)
|
||||
}
|
||||
this.UploadAttachmentsTemp++
|
||||
}
|
||||
|
||||
@@ -186,13 +190,17 @@ export class MessageService {
|
||||
this.RochetChatConnectorService.registerCallback({
|
||||
type: 'reConnect',
|
||||
funx: async ()=> {
|
||||
this.send()
|
||||
this.send().catch((error) =>{
|
||||
console.error(error)
|
||||
})
|
||||
return true
|
||||
}
|
||||
})
|
||||
|
||||
} else if(uploadSuccessfully == false && this.UploadAttachmentsTemp == 1) {
|
||||
this.send()
|
||||
this.send().catch((error) =>{
|
||||
console.error(error)
|
||||
})
|
||||
}
|
||||
else if(uploadSuccessfully == false) {
|
||||
|
||||
@@ -225,7 +233,9 @@ export class MessageService {
|
||||
this.messageSend = true
|
||||
this.redefinedMessage(ChatMessage)
|
||||
}
|
||||
)
|
||||
).catch((error) => {
|
||||
console.error(error)
|
||||
})
|
||||
|
||||
} else {
|
||||
// console.log("reconnect")
|
||||
@@ -233,7 +243,9 @@ export class MessageService {
|
||||
type: 'reConnect',
|
||||
funx: async ()=> {
|
||||
|
||||
this.send()
|
||||
this.send().catch((error) =>{
|
||||
console.error(error)
|
||||
})
|
||||
return true
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user