mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
fix chat estracture
This commit is contained in:
@@ -42,7 +42,8 @@ export class MessageRepositoryService {
|
||||
|
||||
data['requestId'] = InstanceId +'@'+ uuidv4();
|
||||
|
||||
const localActionResult = await this.messageLocalDataSourceService.sendMessage(data)
|
||||
const localActionResult = await this.messageLocalDataSourceService.sendMessage({...data})
|
||||
console.log('create message', data)
|
||||
|
||||
// this.messageLiveDataSourceService.sendMessage({
|
||||
// type: 'sendMessage',
|
||||
@@ -63,17 +64,20 @@ 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
|
||||
// }
|
||||
|
||||
return this.messageLocalDataSourceService.update({...clone, sending: false})
|
||||
// console.log({clone})
|
||||
console.log('update message')
|
||||
//return this.messageLocalDataSourceService.update({...clone, sending: false})
|
||||
return ok(true)
|
||||
}
|
||||
|
||||
} else {
|
||||
return this.messageLocalDataSourceService.update({sending: false})
|
||||
// return this.messageLocalDataSourceService.update({sending: false})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +86,7 @@ export class MessageRepositoryService {
|
||||
if(result.isOk()) {
|
||||
if(result.value) {
|
||||
|
||||
return await this.messageLiveSignalRDataSourceService.sendReadAt({roomId, memberId: SessionStore.user.UserId, chatMessageId: result.value.messageId})
|
||||
// return await this.messageLiveSignalRDataSourceService.sendReadAt({roomId, memberId: SessionStore.user.UserId, chatMessageId: result.value.messageId})
|
||||
}
|
||||
return ok(true)
|
||||
}
|
||||
@@ -116,6 +120,14 @@ export class MessageRepositoryService {
|
||||
}
|
||||
|
||||
sendTyping(roomId) {
|
||||
return this.messageLiveSignalRDataSourceService.sendTyping({roomId, UserName:SessionStore.user.FullName})
|
||||
return this.messageLiveSignalRDataSourceService.sendTyping({
|
||||
roomId,
|
||||
UserName:SessionStore.user.FullName,
|
||||
userId: SessionStore.user.UserId
|
||||
})
|
||||
}
|
||||
|
||||
getMemberByLive({roomId, userId}) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user