mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
fix chat
This commit is contained in:
@@ -209,6 +209,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
|
||||
if(this.room.local == IDBoolean.true) {
|
||||
this.messageOnSetRoomId = this.chatServiceService.roomDirectOnSetId({$roomId: this.room.$id}).subscribe((data) => {
|
||||
|
||||
this.messageOnSetRoomId?.unsubscribe()
|
||||
|
||||
this.room = new RoomViewModel(data)
|
||||
@@ -223,7 +224,8 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
|
||||
setTimeout(() => {
|
||||
this.subscribeToChanges()
|
||||
}, 500);
|
||||
}, 500)
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
@@ -827,21 +829,21 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
}
|
||||
|
||||
async messageResult(result: Promise<Result<MessageOutPutDataDTO, any>> ) {
|
||||
let message = await result
|
||||
// let message = await result
|
||||
|
||||
|
||||
if(message.isOk() && this.room.local == IDBoolean.true) {
|
||||
this.room.local = IDBoolean.false;
|
||||
// if(message.isOk() && this.room.local == IDBoolean.true) {
|
||||
// this.room.local = IDBoolean.false;
|
||||
|
||||
console.log('enter')
|
||||
await this.chatServiceService.roomSetLocalToFalseById({
|
||||
$roomId: this.room.$id,
|
||||
roomId: message.value.roomId
|
||||
})
|
||||
// console.log('enter')
|
||||
// // await this.chatServiceService.roomSetLocalToFalseById({
|
||||
// // $roomId: this.room.$id,
|
||||
// // roomId: message.value.roomId
|
||||
// // })
|
||||
|
||||
this.room.id = message.value.roomId
|
||||
this.subscribeToChanges()
|
||||
}
|
||||
// this.room.id = message.value.roomId
|
||||
// //this.subscribeToChanges()
|
||||
// }
|
||||
}
|
||||
|
||||
async sendAudio(fileName) {
|
||||
@@ -1007,7 +1009,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
componentProps: {
|
||||
roomId: this.room.id,
|
||||
members: [],
|
||||
isAdmin: true,
|
||||
isAdmin: this.isAdmin,
|
||||
roomType: this.roomType
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user