This commit is contained in:
Peter Maquiran
2023-03-09 16:35:54 +01:00
parent 789c2f4e8b
commit b8a1734abb
5 changed files with 64 additions and 48 deletions
@@ -546,6 +546,9 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
}
else if (res.data == 'edit') {
this.editGroup(this.roomId);
} else if (res.data == 'addUser') {
this.addContacts();
}
});
}
@@ -820,25 +823,27 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
}
async addContacts() {
if(this.isAdmin) {
const modal = await this.modalController.create({
component: GroupContactsPage,
componentProps: {
isCreated: this.isGroupCreated,
room: this.room,
members: this.members,
name: this.room.name,
},
cssClass: 'contacts',
backdropDismiss: false
});
const modal = await this.modalController.create({
component: GroupContactsPage,
componentProps: {
isCreated: this.isGroupCreated,
room: this.room,
members: this.members,
name: this.room.name,
},
cssClass: 'contacts',
backdropDismiss: false
});
await modal.present();
modal.onDidDismiss().then(() => {
this.getRoomInfo();
});
}
await modal.present();
modal.onDidDismiss().then(() => {
this.getRoomInfo();
});
}
async editGroup(roomId) {