Skip to content
Snippets Groups Projects
Commit 97884b8c authored by Richard Alam's avatar Richard Alam
Browse files

- notify JS API that user has left the meeting

parent 0b902805
No related branches found
No related tags found
No related merge requests found
......@@ -276,10 +276,13 @@ package org.bigbluebutton.main.api
}
public function handleUserLeftEvent(event:UserLeftEvent):void {
trace("Got notification that user [" + event.userID + "] has left the meeting");
var payload:Object = new Object();
var user:BBBUser = UserManager.getInstance().getConference().getUser(event.userID);
if (user == null) {
trace("[ExternalApiCall:handleParticipantJoinEvent] Cannot find user with ID [" + event.userID + "]");
LogUtil.warn("[ExternalApiCall:handleParticipantJoinEvent] Cannot find user with ID [" + event.userID + "]");
return;
}
......@@ -287,6 +290,8 @@ package org.bigbluebutton.main.api
payload.eventName = EventConstants.USER_LEFT;
payload.userID = UsersUtil.internalUserIDToExternalUserID(user.userID);
trace("Notifying JS API that user [" + payload.userID + "] has left the meeting");
broadcastEvent(payload);
}
......
......@@ -215,12 +215,14 @@ package org.bigbluebutton.main.model.users {
public function participantLeft(userID:String):void {
var user:BBBUser = UserManager.getInstance().getConference().getUser(userID);
UserManager.getInstance().getConference().removeUser(userID);
trace("Notify others that user [" + user.userID + "] has left!!!!");
var joinEvent:UserLeftEvent = new UserLeftEvent(UserLeftEvent.LEFT);
joinEvent.userID = user.userID;
dispatcher.dispatchEvent(joinEvent);
UserManager.getInstance().getConference().removeUser(userID);
}
public function participantJoined(joinedUser:Object):void {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment