mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
save
This commit is contained in:
@@ -22,10 +22,10 @@ export class MessageService {
|
||||
msg = ''
|
||||
rid = ''
|
||||
ts = {}
|
||||
|
||||
u = {
|
||||
name: '',
|
||||
username: '',
|
||||
|
||||
u = {
|
||||
name: '',
|
||||
username: '',
|
||||
_id: ""
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ export class MessageService {
|
||||
if(!this.hasFile) {
|
||||
|
||||
const params = {roomId:this.rid, msg:this.msg, localReference: this.localReference}
|
||||
|
||||
|
||||
await this.sendRequest(params)
|
||||
|
||||
} else {
|
||||
@@ -178,7 +178,7 @@ export class MessageService {
|
||||
return new Promise((resolve, reject)=>{
|
||||
reject(false)
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -197,12 +197,12 @@ 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)
|
||||
|
||||
|
||||
})
|
||||
return true
|
||||
}
|
||||
@@ -213,7 +213,7 @@ export class MessageService {
|
||||
|
||||
async redefinedMessage(ChatMessage , update = true) {
|
||||
ChatMessage = this.NfService.fix_updatedAt(ChatMessage)
|
||||
|
||||
|
||||
const message = this.getChatObj()
|
||||
|
||||
ChatMessage = Object.assign(message, ChatMessage)
|
||||
@@ -241,7 +241,7 @@ export class MessageService {
|
||||
}
|
||||
|
||||
async delateDB() {
|
||||
|
||||
|
||||
// alert('delete data')
|
||||
const message = await MessageModel.get({_id: this._id})
|
||||
await message.delete()
|
||||
@@ -261,8 +261,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,
|
||||
@@ -294,6 +294,7 @@ export class MessageService {
|
||||
|
||||
async save() {
|
||||
const message = this.getChatObj()
|
||||
console.log(message);
|
||||
|
||||
await MessageModel.update(message)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user