mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
verification added on group option
This commit is contained in:
@@ -101,6 +101,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
|||||||
|
|
||||||
audioPermissionStatus: 'granted'| 'denied' | 'prompt' | null = null
|
audioPermissionStatus: 'granted'| 'denied' | 'prompt' | null = null
|
||||||
sessionStore = SessionStore
|
sessionStore = SessionStore
|
||||||
|
groupAdminId = "";
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public wsChatMethodsService: WsChatMethodsService,
|
public wsChatMethodsService: WsChatMethodsService,
|
||||||
@@ -164,7 +165,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
|||||||
console.log(this.roomId)
|
console.log(this.roomId)
|
||||||
this.loggedUser = this.loggedUserChat;
|
this.loggedUser = this.loggedUserChat;
|
||||||
//setTimeout(() => {
|
//setTimeout(() => {
|
||||||
this.getRoomInfo();
|
this.getRoomInfo()
|
||||||
//}, 1000);
|
//}, 1000);
|
||||||
this.getChatMembers();
|
this.getChatMembers();
|
||||||
//this.getMessageDB();
|
//this.getMessageDB();
|
||||||
@@ -401,7 +402,9 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
|||||||
async getRoomInfo() {
|
async getRoomInfo() {
|
||||||
this.wsChatMethodsService.getGroupRoom(this.roomId).loadHistory({});
|
this.wsChatMethodsService.getGroupRoom(this.roomId).loadHistory({});
|
||||||
let room = await this.chatService.getRoomInfo(this.roomId).toPromise();
|
let room = await this.chatService.getRoomInfo(this.roomId).toPromise();
|
||||||
|
console.log('ROOM',room)
|
||||||
this.room = room['room'];
|
this.room = room['room'];
|
||||||
|
this.groupAdminId = this.room.u._id;
|
||||||
if (this.room.name) {
|
if (this.room.name) {
|
||||||
this.roomName = this.room.name.split('-').join(' ');
|
this.roomName = this.room.name.split('-').join(' ');
|
||||||
}
|
}
|
||||||
@@ -503,7 +506,8 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
async openGroupMessagesOptions() {
|
async openGroupMessagesOptions() {
|
||||||
|
alert(this.groupAdminId)
|
||||||
|
if(SessionStore.user.ChatData.data.userId == this.groupAdminId) {
|
||||||
const enterAnimation = (baseEl: any) => {
|
const enterAnimation = (baseEl: any) => {
|
||||||
const backdropAnimation = this.animationController.create()
|
const backdropAnimation = this.animationController.create()
|
||||||
.addElement(baseEl.querySelector('ion-backdrop')!)
|
.addElement(baseEl.querySelector('ion-backdrop')!)
|
||||||
@@ -581,6 +585,9 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
openSendGroupMessageOptions(ev?: any) {
|
openSendGroupMessageOptions(ev?: any) {
|
||||||
if (window.innerWidth <= 701) {
|
if (window.innerWidth <= 701) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user