mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
save all
This commit is contained in:
@@ -504,20 +504,25 @@ export class MessageService {
|
||||
const message = this.getChatObj()
|
||||
let a
|
||||
|
||||
if(!message.id) {
|
||||
delete message.id
|
||||
}
|
||||
|
||||
if (this.localReference) {
|
||||
a = await MessageModel.get({localReference: this.localReference})
|
||||
} else if (this._id) {
|
||||
a = await MessageModel.get({id: this.id})
|
||||
} else if(this.id) {
|
||||
a = await MessageModel.get({_id: this._id})
|
||||
} else if(this.id) {
|
||||
a = await MessageModel.get({id: this.id})
|
||||
}
|
||||
|
||||
for( const [name, value] of Object.entries(message)) {
|
||||
a[name] = value
|
||||
if(a) {
|
||||
for( const [name, value] of Object.entries(message)) {
|
||||
a[name] = value
|
||||
}
|
||||
await a.save()
|
||||
}
|
||||
|
||||
await a.save()
|
||||
|
||||
} else {
|
||||
this.earlySave = true
|
||||
console.log('save change to early')
|
||||
|
||||
Reference in New Issue
Block a user