mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 13:55:51 +00:00
save
This commit is contained in:
@@ -28,6 +28,7 @@ export class GroupMessagesPage implements OnInit {
|
||||
contacts: string[] = [" Ana M.", "Andre F.", "Bruno G.", "Catarina T", "Tiago"];
|
||||
|
||||
roomId: string;
|
||||
loggedUserChat:any;
|
||||
|
||||
constructor(
|
||||
private menu: MenuController,
|
||||
@@ -39,15 +40,14 @@ export class GroupMessagesPage implements OnInit {
|
||||
private authService: AuthService,
|
||||
private alertService: AlertService,
|
||||
) {
|
||||
this.loggedUserChat = authService.ValidatedUserChat['data'];
|
||||
this.isGroupCreated = true;
|
||||
this.roomId = this.navParams.get('roomId');
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.authService.userData$.subscribe((res:any)=>{
|
||||
this.loggedUser=res;
|
||||
console.log(this.loggedUser);
|
||||
});
|
||||
console.log(this.roomId);
|
||||
this.loggedUser=this.loggedUserChat;
|
||||
this.getRoomInfo();
|
||||
}
|
||||
|
||||
@@ -121,17 +121,17 @@ export class GroupMessagesPage implements OnInit {
|
||||
sendMessage(){
|
||||
|
||||
let body = {
|
||||
"message":
|
||||
{
|
||||
"rid": this.roomId, "msg": this.message
|
||||
"message":
|
||||
{
|
||||
"rid": this.roomId, "msg": this.message
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.chatService.sendMessage(body).subscribe(res=> {
|
||||
this.getRoomInfo();
|
||||
|
||||
|
||||
},(error) => {
|
||||
|
||||
|
||||
});
|
||||
this.message = "";
|
||||
}
|
||||
@@ -154,7 +154,7 @@ export class GroupMessagesPage implements OnInit {
|
||||
console.log('cancel');
|
||||
}
|
||||
console.log('OK2');
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ export class GroupMessagesPage implements OnInit {
|
||||
}
|
||||
async addContacts(){
|
||||
console.log(this.members);
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: GroupContactsPage,
|
||||
componentProps: {
|
||||
@@ -180,7 +180,7 @@ export class GroupMessagesPage implements OnInit {
|
||||
room: this.room,
|
||||
members: this.members,
|
||||
name: this.room.name,
|
||||
},
|
||||
},
|
||||
cssClass: 'contacts',
|
||||
backdropDismiss: false
|
||||
});
|
||||
@@ -211,7 +211,7 @@ export class GroupMessagesPage implements OnInit {
|
||||
handler: () => {
|
||||
console.log('Play clicked');
|
||||
}
|
||||
},
|
||||
},
|
||||
]
|
||||
});
|
||||
await actionSheet.present();
|
||||
|
||||
Reference in New Issue
Block a user