mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
save
This commit is contained in:
@@ -98,6 +98,8 @@ export class ContactsPage implements OnInit {
|
||||
this.chatService.createRoom(body).subscribe(res => {
|
||||
console.log(res);
|
||||
this.room = res['room'];
|
||||
console.log(this.room._id);
|
||||
|
||||
this.getDirectMessage(this.room._id);
|
||||
});
|
||||
}
|
||||
@@ -106,21 +108,22 @@ export class ContactsPage implements OnInit {
|
||||
|
||||
this.chatService.getAllDirectMessages().subscribe(res=>{
|
||||
let result = res['ims'].filter(data => data._id == roomId);
|
||||
console.log(result[0]);
|
||||
|
||||
this.dm = result[0];
|
||||
console.log(this.dm);
|
||||
this.openModal(this.dm);
|
||||
this.openModal(this.dm._id);
|
||||
});
|
||||
}
|
||||
async openModal(dm:any){
|
||||
async openModal(roomId:any){
|
||||
this.close();
|
||||
console.log(dm);
|
||||
console.log(roomId);
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: MessagesPage,
|
||||
cssClass: 'group-messages',
|
||||
backdropDismiss: false,
|
||||
componentProps: {
|
||||
dm: dm,
|
||||
roomId: roomId,
|
||||
},
|
||||
});
|
||||
await modal.present();
|
||||
|
||||
Reference in New Issue
Block a user