mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
fix duplicate message
This commit is contained in:
@@ -65,16 +65,18 @@ export class MessageRepositoryService {
|
||||
delete sendMessageResult.value.sender
|
||||
}
|
||||
|
||||
// let clone: TableMessage = {
|
||||
// ...sendMessageResult.value,
|
||||
// messageId: sendMessageResult.value.id,
|
||||
// id : localActionResult.value
|
||||
// }
|
||||
let clone: TableMessage = {
|
||||
...sendMessageResult.value,
|
||||
messageId: sendMessageResult.value.id,
|
||||
id : localActionResult.value
|
||||
}
|
||||
|
||||
// console.log({clone})
|
||||
console.log('update message')
|
||||
//return this.messageLocalDataSourceService.update({...clone, sending: false})
|
||||
return this.messageLocalDataSourceService.update({...clone, sending: false})
|
||||
return ok(true)
|
||||
} else {
|
||||
console.log('no message to upload')
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -84,7 +86,7 @@ export class MessageRepositoryService {
|
||||
|
||||
|
||||
sendMessageDelete(data: MessageDeleteInputDTO) {
|
||||
|
||||
|
||||
data['requestId'] = InstanceId +'@'+ uuidv4();
|
||||
|
||||
return this.messageLiveSignalRDataSourceService.sendMessageDelete(data)
|
||||
@@ -94,7 +96,7 @@ export class MessageRepositoryService {
|
||||
const result = await this.messageLocalDataSourceService.getLastMessageByRoomId(roomId)
|
||||
if(result.isOk()) {
|
||||
if(result.value) {
|
||||
|
||||
|
||||
return await this.messageLiveSignalRDataSourceService.sendReadAt({roomId, memberId: SessionStore.user.UserId, chatMessageId: result.value.messageId})
|
||||
}
|
||||
return ok(true)
|
||||
@@ -130,7 +132,7 @@ export class MessageRepositoryService {
|
||||
|
||||
sendTyping(roomId) {
|
||||
return this.messageLiveSignalRDataSourceService.sendTyping({
|
||||
roomId,
|
||||
roomId,
|
||||
UserName:SessionStore.user.FullName,
|
||||
userId: SessionStore.user.UserId
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user