mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 05:45:50 +00:00
Implement add contacts to group-chat
This commit is contained in:
@@ -45,6 +45,9 @@ export class GroupMessagesPage implements OnInit {
|
||||
this.getGroupContacts();
|
||||
this.loadGroupMessages()
|
||||
}
|
||||
close(){
|
||||
this.modalController.dismiss();
|
||||
}
|
||||
getGroupContacts(){
|
||||
//If group is private call getGroupMembers
|
||||
if(this.room.t === 'p'){
|
||||
@@ -67,7 +70,8 @@ export class GroupMessagesPage implements OnInit {
|
||||
if(this.room.t === 'p'){
|
||||
this.chatService.getPrivateGroupMessages(this.room._id).subscribe(res=>{
|
||||
console.log(res);
|
||||
this.messages = res['messages'].reverse();
|
||||
let msgOnly = res['messages'].filter(data => data.t != 'au');
|
||||
this.messages = msgOnly.reverse();
|
||||
});
|
||||
}
|
||||
//Otherwise call getChannelMembers for públic groups
|
||||
@@ -148,6 +152,7 @@ export class GroupMessagesPage implements OnInit {
|
||||
return await popover.present();
|
||||
}
|
||||
async addContacts(){
|
||||
this.close();
|
||||
const modal = await this.modalController.create({
|
||||
component: GroupContactsPage,
|
||||
componentProps: {
|
||||
|
||||
Reference in New Issue
Block a user