This commit is contained in:
Peter Maquiran
2024-10-08 13:16:01 +01:00
parent 0dd4fd665b
commit 9c8ecc182f
22 changed files with 121 additions and 60 deletions
@@ -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
}
});