- remove users from guests waiting list

This commit is contained in:
Richard Alam 2017-09-29 10:32:05 -07:00
parent 7837631b88
commit f6a993763c
4 changed files with 48 additions and 5 deletions

View File

@ -0,0 +1,17 @@
package org.bigbluebutton.core.events
{
import flash.events.Event;
public class GuestWaitingApprovedEvent extends Event
{
public static const GUEST_WAITING_APPROVED: String = "GUEST_WAITING_APPROVED";
public var approvedBy: String;
public function GuestWaitingApprovedEvent(approvedBy: String)
{
super(GUEST_WAITING_APPROVED, false, false);
this.approvedBy = approvedBy;
}
}
}

View File

@ -71,7 +71,7 @@ $Id: $
}
public function sendResponseToAllGuests(approved:Boolean):void {
//removeAllGuests();
removeAllGuests();
var _guests: Array = LiveMeeting.inst().guestsWaiting.getGuests();
var approvedGuests: Array = new Array();
for (var i:int = 0; i < _guests.length; i++) {
@ -105,9 +105,6 @@ $Id: $
}
public function removeAllGuests():void {
var removeGuestEvent:RemoveGuestEvent = new RemoveGuestEvent(RemoveGuestEvent.REMOVE_ALL);
dispatcher.dispatchEvent(removeGuestEvent);
closeWindow();
}

View File

@ -28,6 +28,7 @@ package org.bigbluebutton.modules.users.services
import org.bigbluebutton.core.EventConstants;
import org.bigbluebutton.core.UsersUtil;
import org.bigbluebutton.core.events.CoreEvent;
import org.bigbluebutton.core.events.GuestWaitingApprovedEvent;
import org.bigbluebutton.core.events.MeetingTimeRemainingEvent;
import org.bigbluebutton.core.events.NewGuestWaitingEvent;
import org.bigbluebutton.core.events.UserEmojiChangedEvent;
@ -194,6 +195,10 @@ package org.bigbluebutton.modules.users.services
break;
case "UserRoleChangedEvtMsg":
handleUserRoleChangedEvtMsg(message);
break;
case "GuestsWaitingApprovedEvtMsg":
handleGuestsWaitingApprovedEvtMsg(message);
break;
}
}
@ -292,6 +297,24 @@ package org.bigbluebutton.modules.users.services
}
private function removeGuestWaiting(userId: String): void {
LiveMeeting.inst().guestsWaiting.remove(userId);
}
private function handleGuestsWaitingApprovedEvtMsg(msg: Object): void {
var body: Object = msg.body as Object;
var guests: Array = body.guests as Array;
for (var i: int = 0; i < guests.length; i++) {
var guest: Object = guests[i] as Object;
removeGuestWaiting(guest.guest as String);
}
var guestsWaitingEvent:GuestWaitingApprovedEvent =
new GuestWaitingApprovedEvent(body.approvedBy as String);
dispatcher.dispatchEvent(guestsWaitingEvent);
}
private function handleGetUsersMeetingRespMsg(msg: Object):void {
var body: Object = msg.body as Object
var users: Array = body.users as Array;

View File

@ -615,9 +615,15 @@ package org.bigbluebutton.modules.users.services
}
private function removeGuestsWaiting(userIds: Array): void {
for (var i:int = 0; i < userIds.length; i++) {
LiveMeeting.inst().guestsWaiting.remove(userIds[i]);
}
}
public function approveGuestAccess(userIds: Array, approve:Boolean):void {
var _guests: Array = new Array();
var status: String =GuestWaiting.DENY;
var status: String = GuestWaiting.DENY;
if (approve) status = GuestWaiting.ALLOW;
for (var i:int = 0; i < userIds.length; i++) {