mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
fix
This commit is contained in:
@@ -238,7 +238,6 @@ export class RoomService {
|
||||
|
||||
const args = message.fields.args
|
||||
|
||||
// alert(JSON.stringify(args))
|
||||
|
||||
|
||||
if (typeof args[1] != 'object') {
|
||||
@@ -367,8 +366,7 @@ export class RoomService {
|
||||
|
||||
if(this.messages[i]?._id == id ) {
|
||||
|
||||
console.log(_id,'==',this.messages[i]?._id, true)
|
||||
this.messages.splice(i, 1)
|
||||
|
||||
|
||||
//Get previous last message from room
|
||||
const previousLastMessage = this.messages.slice(-1)[0];
|
||||
@@ -377,7 +375,7 @@ export class RoomService {
|
||||
this.calDateDuration(previousLastMessage._updatedAt)
|
||||
this.sortRoomList()
|
||||
|
||||
if (SessionStore.user.RochetChatUser == this.messages[i].u.username) {
|
||||
if (SessionStore.user.RochetChatUser == this.messages[i]?.u?.username) {
|
||||
const allMemberThatIsOffline = this.getAllMemberThatIsOffline()
|
||||
|
||||
DeleteMessageModel.create({
|
||||
@@ -389,7 +387,10 @@ export class RoomService {
|
||||
})
|
||||
}
|
||||
|
||||
this.messages[i].delateDB()
|
||||
this.messages[i]?.delateDB()
|
||||
|
||||
console.log(_id,'==',this.messages[i]?._id, true)
|
||||
this.messages.splice(i, 1)
|
||||
|
||||
return true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user