- show voice only users in get meeting api response

This commit is contained in:
Richard Alam 2017-10-24 12:59:09 -07:00
parent f7ba155f97
commit 3e15405966
3 changed files with 19 additions and 3 deletions

View File

@ -707,6 +707,14 @@ public class MeetingService implements MessageListener {
if (user != null) {
user.setVoiceJoined(true);
return;
} else {
if (message.userId.startsWith("v_")) {
// A dial-in user joined the meeting. Dial-in users by convention has userId that starts with "v_".
User vuser = new User(message.userId, message.userId,
message.name, "DIAL-IN-USER", "no-avatar-url", true, false);
vuser.setVoiceJoined(true);
m.userJoined(vuser);
}
}
return;
}
@ -717,7 +725,13 @@ public class MeetingService implements MessageListener {
if (m != null) {
User user = m.getUserById(message.userId);
if (user != null) {
user.setVoiceJoined(false);
if (message.userId.startsWith("v_")) {
// A dial-in user left the meeting. Dial-in users by convention has userId that starts with "v_".
User vuser = m.userLeft(message.userId);
} else {
user.setVoiceJoined(false);
}
return;
}
return;

View File

@ -3,9 +3,11 @@ package org.bigbluebutton.api.messaging.messages;
public class UserJoinedVoice implements IMessage {
public final String userId;
public final String meetingId;
public final String name;
public UserJoinedVoice(String meetingId, String userId) {
public UserJoinedVoice(String meetingId, String userId, String name) {
this.meetingId = meetingId;
this.userId = userId;
this.name = name;
}
}

View File

@ -98,7 +98,7 @@ class OldMeetingMsgHdlrActor(val olgMsgGW: OldMessageReceivedGW)
if (msg.body.listenOnly) {
olgMsgGW.handle(new UserListeningOnly(msg.header.meetingId, msg.body.intId, msg.body.listenOnly))
} else {
olgMsgGW.handle(new UserJoinedVoice(msg.header.meetingId, msg.body.intId))
olgMsgGW.handle(new UserJoinedVoice(msg.header.meetingId, msg.body.intId, msg.body.callerName))
}
}