mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
fix bug
This commit is contained in:
@@ -24,10 +24,10 @@ export class MessageService {
|
||||
msg = ''
|
||||
rid = ''
|
||||
ts = {}
|
||||
|
||||
u = {
|
||||
name: '',
|
||||
username: '',
|
||||
|
||||
u = {
|
||||
name: '',
|
||||
username: '',
|
||||
_id: ""
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ export class MessageService {
|
||||
}
|
||||
|
||||
if(this.hasFile) {
|
||||
|
||||
|
||||
if(this.file.type != 'application/webtrix') {
|
||||
this.displayType = this.file.type.replace('application/','').toUpperCase()
|
||||
}
|
||||
@@ -129,7 +129,7 @@ export class MessageService {
|
||||
if(!this.hasFile) {
|
||||
|
||||
const params = {roomId:this.rid, msg:this.msg, localReference: this.localReference}
|
||||
|
||||
|
||||
await this.sendRequest(params)
|
||||
|
||||
} else {
|
||||
@@ -143,7 +143,7 @@ export class MessageService {
|
||||
|
||||
this.uploadingFile = false
|
||||
|
||||
if(uploadSuccessfully || this.hasSendAttachment == false) {
|
||||
if(uploadSuccessfully ) {
|
||||
this.hasSendAttachment = true
|
||||
this.errorUploadingAttachment = false
|
||||
this.temporaryData = {}
|
||||
@@ -169,7 +169,7 @@ export class MessageService {
|
||||
return new Promise((resolve, reject)=>{
|
||||
reject(false)
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -193,13 +193,8 @@ export class MessageService {
|
||||
this.WsChatService.registerCallback({
|
||||
type: 'reConnect',
|
||||
funx: async ()=> {
|
||||
|
||||
this.WsChatService.send(params).then(({message, requestId}) => {
|
||||
let ChatMessage = message.result
|
||||
this.messageSend = true
|
||||
this.redefinedMessage(ChatMessage)
|
||||
|
||||
})
|
||||
|
||||
this.sendRequest(params)
|
||||
return true
|
||||
}
|
||||
})
|
||||
@@ -209,7 +204,7 @@ export class MessageService {
|
||||
|
||||
async redefinedMessage(ChatMessage , update = true) {
|
||||
ChatMessage = this.NfService.fix_updatedAt(ChatMessage)
|
||||
|
||||
|
||||
const message = this.getChatObj()
|
||||
|
||||
ChatMessage = Object.assign(message, ChatMessage)
|
||||
@@ -244,7 +239,7 @@ export class MessageService {
|
||||
title_link_download: this.attachments[0].title_link_download,
|
||||
ts: this.attachments[0].ts
|
||||
}
|
||||
|
||||
|
||||
console.log(this.attachments)
|
||||
// save the changes to the storage
|
||||
this.save()
|
||||
@@ -264,7 +259,7 @@ export class MessageService {
|
||||
}
|
||||
|
||||
async delateDB() {
|
||||
|
||||
|
||||
// alert('delete data')
|
||||
const message = await MessageModel.get({_id: this._id})
|
||||
await message.delete()
|
||||
@@ -284,8 +279,8 @@ export class MessageService {
|
||||
return {
|
||||
channels: this.channels,
|
||||
mentions: this.mentions,
|
||||
//msg: this.AESEncrypt.encrypt(this.msg, SessionStore.user.RochetChatUser),
|
||||
msg:this.msg,
|
||||
//msg: this.AESEncrypt.encrypt(this.msg, SessionStore.user.RochetChatUser),
|
||||
msg:this.msg,
|
||||
rid: this.rid,
|
||||
ts: this.ts,
|
||||
u: this.u,
|
||||
|
||||
Reference in New Issue
Block a user