mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
create room bug solved on web
This commit is contained in:
@@ -99,6 +99,10 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
audioDuration = 0;
|
||||
audioTimer:any;
|
||||
@ViewChild('range', {static: false}) range: IonRange;
|
||||
room: any = new Array();
|
||||
roomName: any;
|
||||
isAdmin = false;
|
||||
roomCountDownDate: string;
|
||||
|
||||
constructor(
|
||||
public popoverController: PopoverController,
|
||||
@@ -128,6 +132,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges): void {
|
||||
this.wsChatMethodsService.getAllRooms();
|
||||
this.wsChatMethodsService.getDmRoom(this.roomId).loadHistory({})
|
||||
|
||||
this.wsChatMethodsService.getDmRoom(this.roomId).scrollDown = this.scrollToBottomClicked
|
||||
@@ -164,9 +169,9 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.wsChatMethodsService.getAllRooms();
|
||||
this.chatService.refreshtoken();
|
||||
this.scrollToBottom();
|
||||
|
||||
this.getChatMembers();
|
||||
|
||||
this.deleteRecording();
|
||||
@@ -1122,6 +1127,27 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
|
||||
},1000)
|
||||
}
|
||||
|
||||
async getRoomInfo() {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user