mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
fix chat rooms list
This commit is contained in:
@@ -169,6 +169,8 @@ export class AuthService {
|
||||
try {
|
||||
let guid: any = await this.AttachmentsService.uploadFile(formData).toPromise()
|
||||
message.file.guid = guid.path
|
||||
|
||||
console.log('========================================',guid)
|
||||
// await this.storage.set(guid.path, message.file.image_url).then(() => {
|
||||
// console.log('add picture to chat IMAGE SAVED')
|
||||
// // message.getFileFromDb()
|
||||
|
||||
@@ -245,6 +245,7 @@ export class MessageService {
|
||||
ts: this.attachments[0].ts
|
||||
}
|
||||
|
||||
console.log(this.attachments)
|
||||
// save the changes to the storage
|
||||
this.save()
|
||||
}
|
||||
|
||||
@@ -371,6 +371,13 @@ export class RoomService {
|
||||
|
||||
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];
|
||||
this.lastMessage = previousLastMessage;
|
||||
|
||||
this.calDateDuration(previousLastMessage._updatedAt)
|
||||
this.sortRoomList()
|
||||
|
||||
if (SessionStore.user.RochetChatUser == this.messages[i].u.username) {
|
||||
const allMemberThatIsOffline = this.getAllMemberThatIsOffline()
|
||||
@@ -386,13 +393,6 @@ export class RoomService {
|
||||
|
||||
await this.messages[i].delateDB()
|
||||
|
||||
//Get previous last message from room
|
||||
const previousLastMessage = this.messages.slice(-1)[0];
|
||||
|
||||
this.lastMessage = previousLastMessage;
|
||||
this.calDateDuration(previousLastMessage._updatedAt)
|
||||
this.sortRoomList()
|
||||
|
||||
return true
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user