mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
Bug on group chat options for admin
This commit is contained in:
@@ -16,5 +16,8 @@
|
||||
"sound"
|
||||
]
|
||||
}
|
||||
},
|
||||
"server": {
|
||||
"url": "http://192.168.0.60:8100"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,6 +133,7 @@
|
||||
"g": "^2.0.1",
|
||||
"global": "^4.4.0",
|
||||
"hammerjs": "^2.0.8",
|
||||
"howler": "^2.2.3",
|
||||
"http-server": "^14.1.1",
|
||||
"i": "^0.3.7",
|
||||
"ionic-angular": "^3.9.10",
|
||||
|
||||
@@ -83,6 +83,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
showAvatar = true;
|
||||
audioPermissionStatus: 'granted'| 'denied' | 'prompt' | null = null
|
||||
sessionStore = SessionStore
|
||||
isAdmin = false;
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
public popoverController: PopoverController,
|
||||
@@ -364,7 +365,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
} catch (err) { }
|
||||
}
|
||||
|
||||
getRoomInfo() {
|
||||
async getRoomInfo() {
|
||||
this.showLoader = true;
|
||||
// this.chatService.getRoomInfo(this.roomId).subscribe(room => {
|
||||
// this.room = room['room'];
|
||||
@@ -375,6 +376,24 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
// this.getGroupContacts(this.room);
|
||||
// this.showLoader = false;
|
||||
// });
|
||||
this.wsChatMethodsService.getGroupRoom(this.roomId).loadHistory({});
|
||||
let room = await this.chatService.getRoomInfo(this.roomId).toPromise();
|
||||
// console.log('ROOM',room)
|
||||
this.room = room['room'];
|
||||
if (this.room.name) {
|
||||
this.roomName = this.room.name.split('-').join(' ');
|
||||
}
|
||||
|
||||
|
||||
if(SessionStore.user.ChatData.data.userId == this.room.u._id){
|
||||
this.isAdmin = true
|
||||
} else {
|
||||
this.isAdmin = false
|
||||
}
|
||||
|
||||
if (this.room.customFields.countDownDate) {
|
||||
this.roomCountDownDate = this.room.customFields.countDownDate;
|
||||
}
|
||||
}
|
||||
|
||||
async getChatMembers() {
|
||||
@@ -509,6 +528,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
componentProps: {
|
||||
roomId: this.roomId,
|
||||
members: this.members,
|
||||
isAdmin: this.isAdmin,
|
||||
},
|
||||
});
|
||||
await modal.present();
|
||||
|
||||
Reference in New Issue
Block a user