mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
add readAt and delete message
This commit is contained in:
@@ -42,6 +42,7 @@ import { MessageInputDTO } from 'src/app/module/chat/data/dto/message/messageInp
|
||||
import { RoomListItemOutPutDTO } from 'src/app/module/chat/data/dto/room/roomListOutputDTO';
|
||||
import { UserTypingServiceRepository } from 'src/app/module/chat/data/repository/user-typing-repository.service';
|
||||
import { UserTypingList } from 'src/app/module/chat/data/data-source/userTyping/user-typing-local-data-source.service';
|
||||
import { ChatServiceService } from 'src/app/module/chat/domain/chat-service.service';
|
||||
|
||||
|
||||
const IMAGE_DIR = 'stored-images';
|
||||
@@ -147,6 +148,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
private roomRepositoryService: RoomRepositoryService,
|
||||
private messageRepositoryService: MessageRepositoryService,
|
||||
private userTypingServiceRepository: UserTypingServiceRepository,
|
||||
private chatServiceService: ChatServiceService
|
||||
) {
|
||||
// update
|
||||
this.checkAudioPermission()
|
||||
@@ -181,9 +183,6 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
}, 200)
|
||||
|
||||
console.log('new message==============')
|
||||
// this.messageRepositoryService.sendReadAt({roomId: this.roomId}).then((e) => {
|
||||
// console.log(e)
|
||||
// })
|
||||
|
||||
})
|
||||
|
||||
@@ -194,6 +193,12 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
// })
|
||||
}
|
||||
|
||||
sendReadAt() {
|
||||
this.messageRepositoryService.sendReadAt({roomId: this.roomId}).then((e) => {
|
||||
console.log(e)
|
||||
})
|
||||
}
|
||||
|
||||
sendTyping() {
|
||||
this.userTypingServiceRepository.addUserTyping(this.roomId)
|
||||
}
|
||||
@@ -915,7 +920,14 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
}
|
||||
|
||||
|
||||
deleteMessage() {}
|
||||
messageDelete({messageId}) {
|
||||
// this.messageRepositoryService.sendMessageDelete()
|
||||
|
||||
this.chatServiceService.messageDelete({
|
||||
messageId: messageId,
|
||||
roomId: this.roomId,
|
||||
})
|
||||
}
|
||||
|
||||
async addFileToChat(types: typeof FileType[]) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user