Merge pull request #17674 from gustavotrott/fix-voiceUsers-color
fix: dial-in-participants not appearing in the participant list
This commit is contained in:
commit
614aa34496
@ -19,8 +19,8 @@ trait UserConnectedToGlobalAudioMsgHdlr {
|
|||||||
val header = BbbClientMsgHeader(UserJoinedVoiceConfToClientEvtMsg.NAME, props.meetingProp.intId, vu.intId)
|
val header = BbbClientMsgHeader(UserJoinedVoiceConfToClientEvtMsg.NAME, props.meetingProp.intId, vu.intId)
|
||||||
|
|
||||||
val body = UserJoinedVoiceConfToClientEvtMsgBody(voiceConf = msg.header.voiceConf, intId = vu.intId, voiceUserId = vu.intId,
|
val body = UserJoinedVoiceConfToClientEvtMsgBody(voiceConf = msg.header.voiceConf, intId = vu.intId, voiceUserId = vu.intId,
|
||||||
callingWith = vu.callingWith, callerName = vu.callerName,
|
callingWith = vu.callingWith, callerName = vu.callerName, callerNum = vu.callerNum, color = vu.color,
|
||||||
callerNum = vu.callerNum, muted = true, talking = false, listenOnly = true)
|
muted = true, talking = false, listenOnly = true)
|
||||||
val event = UserJoinedVoiceConfToClientEvtMsg(header, body)
|
val event = UserJoinedVoiceConfToClientEvtMsg(header, body)
|
||||||
val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
|
val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
|
||||||
outGW.send(msgEvent)
|
outGW.send(msgEvent)
|
||||||
@ -36,6 +36,7 @@ trait UserConnectedToGlobalAudioMsgHdlr {
|
|||||||
callingWith = "flash",
|
callingWith = "flash",
|
||||||
callerName = user.name,
|
callerName = user.name,
|
||||||
callerNum = user.name,
|
callerNum = user.name,
|
||||||
|
color = user.color,
|
||||||
muted = true,
|
muted = true,
|
||||||
talking = false,
|
talking = false,
|
||||||
listenOnly = true,
|
listenOnly = true,
|
||||||
|
@ -130,7 +130,7 @@ trait ValidateAuthTokenReqMsgHdlr extends HandlerHelpers {
|
|||||||
def sendAllVoiceUsersInMeeting(requesterId: String, voiceUsers: VoiceUsers, meetingId: String): Unit = {
|
def sendAllVoiceUsersInMeeting(requesterId: String, voiceUsers: VoiceUsers, meetingId: String): Unit = {
|
||||||
val vu = VoiceUsers.findAll(voiceUsers).map { u =>
|
val vu = VoiceUsers.findAll(voiceUsers).map { u =>
|
||||||
VoiceConfUser(intId = u.intId, voiceUserId = u.voiceUserId, callingWith = u.callingWith, callerName = u.callerName,
|
VoiceConfUser(intId = u.intId, voiceUserId = u.voiceUserId, callingWith = u.callingWith, callerName = u.callerName,
|
||||||
callerNum = u.callerNum, muted = u.muted, talking = u.talking, listenOnly = u.listenOnly)
|
callerNum = u.callerNum, color = u.color, muted = u.muted, talking = u.talking, listenOnly = u.listenOnly)
|
||||||
}
|
}
|
||||||
|
|
||||||
val event = MsgBuilder.buildGetVoiceUsersMeetingRespMsg(meetingId, requesterId, vu)
|
val event = MsgBuilder.buildGetVoiceUsersMeetingRespMsg(meetingId, requesterId, vu)
|
||||||
|
@ -14,7 +14,7 @@ trait SyncGetVoiceUsersMsgHdlr {
|
|||||||
def buildSyncGetVoiceUsersRespMsg(): BbbCommonEnvCoreMsg = {
|
def buildSyncGetVoiceUsersRespMsg(): BbbCommonEnvCoreMsg = {
|
||||||
val voiceUsers = VoiceUsers.findAll(liveMeeting.voiceUsers).map { u =>
|
val voiceUsers = VoiceUsers.findAll(liveMeeting.voiceUsers).map { u =>
|
||||||
VoiceConfUser(intId = u.intId, voiceUserId = u.voiceUserId, callingWith = u.callingWith, callerName = u.callerName,
|
VoiceConfUser(intId = u.intId, voiceUserId = u.voiceUserId, callingWith = u.callingWith, callerName = u.callerName,
|
||||||
callerNum = u.callerNum, muted = u.muted, talking = u.talking, listenOnly = u.listenOnly)
|
callerNum = u.callerNum, color = u.color, muted = u.muted, talking = u.talking, listenOnly = u.listenOnly)
|
||||||
}
|
}
|
||||||
|
|
||||||
val routing = Routing.addMsgToHtml5InstanceIdRouting(liveMeeting.props.meetingProp.intId, liveMeeting.props.systemProps.html5InstanceId.toString)
|
val routing = Routing.addMsgToHtml5InstanceIdRouting(liveMeeting.props.meetingProp.intId, liveMeeting.props.systemProps.html5InstanceId.toString)
|
||||||
|
@ -88,6 +88,7 @@ trait UserJoinedVoiceConfEvtMsgHdlr extends SystemConfiguration {
|
|||||||
msg.body.callingWith,
|
msg.body.callingWith,
|
||||||
msg.body.callerIdName,
|
msg.body.callerIdName,
|
||||||
msg.body.callerIdNum,
|
msg.body.callerIdNum,
|
||||||
|
userColor,
|
||||||
msg.body.muted,
|
msg.body.muted,
|
||||||
msg.body.talking,
|
msg.body.talking,
|
||||||
"freeswitch"
|
"freeswitch"
|
||||||
|
@ -7,9 +7,10 @@ import org.bigbluebutton.core.bus.InternalEventBus
|
|||||||
import org.bigbluebutton.core2.MeetingStatus2x
|
import org.bigbluebutton.core2.MeetingStatus2x
|
||||||
import org.bigbluebutton.core2.message.senders.MsgBuilder
|
import org.bigbluebutton.core2.message.senders.MsgBuilder
|
||||||
import org.bigbluebutton.common2.msgs._
|
import org.bigbluebutton.common2.msgs._
|
||||||
import org.bigbluebutton.core.running.{ LiveMeeting, MeetingActor, OutMsgRouter }
|
import org.bigbluebutton.core.running.{LiveMeeting, MeetingActor, OutMsgRouter}
|
||||||
import org.bigbluebutton.core.models._
|
import org.bigbluebutton.core.models._
|
||||||
import org.bigbluebutton.core.apps.users.UsersApp
|
import org.bigbluebutton.core.apps.users.UsersApp
|
||||||
|
import org.bigbluebutton.core.util.ColorPicker
|
||||||
|
|
||||||
object VoiceApp extends SystemConfiguration {
|
object VoiceApp extends SystemConfiguration {
|
||||||
|
|
||||||
@ -164,6 +165,7 @@ object VoiceApp extends SystemConfiguration {
|
|||||||
cvu.callingWith,
|
cvu.callingWith,
|
||||||
cvu.callerIdName,
|
cvu.callerIdName,
|
||||||
cvu.callerIdNum,
|
cvu.callerIdNum,
|
||||||
|
ColorPicker.nextColor(liveMeeting.props.meetingProp.intId),
|
||||||
cvu.muted,
|
cvu.muted,
|
||||||
cvu.talking,
|
cvu.talking,
|
||||||
cvu.calledInto
|
cvu.calledInto
|
||||||
@ -213,6 +215,7 @@ object VoiceApp extends SystemConfiguration {
|
|||||||
callingWith: String,
|
callingWith: String,
|
||||||
callerIdName: String,
|
callerIdName: String,
|
||||||
callerIdNum: String,
|
callerIdNum: String,
|
||||||
|
color: String,
|
||||||
muted: Boolean,
|
muted: Boolean,
|
||||||
talking: Boolean,
|
talking: Boolean,
|
||||||
callingInto: String
|
callingInto: String
|
||||||
@ -240,6 +243,7 @@ object VoiceApp extends SystemConfiguration {
|
|||||||
voiceUserState.voiceUserId,
|
voiceUserState.voiceUserId,
|
||||||
voiceUserState.callerName,
|
voiceUserState.callerName,
|
||||||
voiceUserState.callerNum,
|
voiceUserState.callerNum,
|
||||||
|
voiceUserState.color,
|
||||||
voiceUserState.muted,
|
voiceUserState.muted,
|
||||||
voiceUserState.talking,
|
voiceUserState.talking,
|
||||||
voiceUserState.callingWith,
|
voiceUserState.callingWith,
|
||||||
@ -267,6 +271,7 @@ object VoiceApp extends SystemConfiguration {
|
|||||||
callingWith,
|
callingWith,
|
||||||
callerIdName,
|
callerIdName,
|
||||||
callerIdNum,
|
callerIdNum,
|
||||||
|
color,
|
||||||
muted,
|
muted,
|
||||||
talking,
|
talking,
|
||||||
listenOnly = isListenOnly,
|
listenOnly = isListenOnly,
|
||||||
|
@ -174,6 +174,7 @@ case class VoiceUserState(
|
|||||||
callingWith: String,
|
callingWith: String,
|
||||||
callerName: String,
|
callerName: String,
|
||||||
callerNum: String,
|
callerNum: String,
|
||||||
|
color: String,
|
||||||
muted: Boolean,
|
muted: Boolean,
|
||||||
talking: Boolean,
|
talking: Boolean,
|
||||||
listenOnly: Boolean,
|
listenOnly: Boolean,
|
||||||
|
@ -42,6 +42,7 @@ trait GuestsWaitingApprovedMsgHdlr extends HandlerHelpers with RightsManagementT
|
|||||||
"none",
|
"none",
|
||||||
dialInUser.name,
|
dialInUser.name,
|
||||||
dialInUser.name,
|
dialInUser.name,
|
||||||
|
dialInUser.color,
|
||||||
MeetingStatus2x.isMeetingMuted(liveMeeting.status),
|
MeetingStatus2x.isMeetingMuted(liveMeeting.status),
|
||||||
false,
|
false,
|
||||||
"freeswitch"
|
"freeswitch"
|
||||||
|
@ -65,7 +65,7 @@ object FakeUserGenerator {
|
|||||||
val voiceUserId = RandomStringGenerator.randomAlphanumericString(8)
|
val voiceUserId = RandomStringGenerator.randomAlphanumericString(8)
|
||||||
val lastFloorTime = System.currentTimeMillis().toString();
|
val lastFloorTime = System.currentTimeMillis().toString();
|
||||||
VoiceUserState(intId = user.id, voiceUserId = voiceUserId, callingWith, callerName = user.name,
|
VoiceUserState(intId = user.id, voiceUserId = voiceUserId, callingWith, callerName = user.name,
|
||||||
callerNum = user.name, muted, talking, listenOnly, "freeswitch", System.currentTimeMillis(), floor, lastFloorTime)
|
callerNum = user.name, "#ff6242", muted, talking, listenOnly, "freeswitch", System.currentTimeMillis(), floor, lastFloorTime)
|
||||||
}
|
}
|
||||||
|
|
||||||
def createFakeVoiceOnlyUser(callingWith: String, muted: Boolean, talking: Boolean,
|
def createFakeVoiceOnlyUser(callingWith: String, muted: Boolean, talking: Boolean,
|
||||||
@ -75,7 +75,7 @@ object FakeUserGenerator {
|
|||||||
val name = getRandomElement(firstNames, random) + " " + getRandomElement(lastNames, random)
|
val name = getRandomElement(firstNames, random) + " " + getRandomElement(lastNames, random)
|
||||||
val lastFloorTime = System.currentTimeMillis().toString();
|
val lastFloorTime = System.currentTimeMillis().toString();
|
||||||
VoiceUserState(intId, voiceUserId = voiceUserId, callingWith, callerName = name,
|
VoiceUserState(intId, voiceUserId = voiceUserId, callingWith, callerName = name,
|
||||||
callerNum = name, muted, talking, listenOnly, "freeswitch", System.currentTimeMillis(), floor, lastFloorTime)
|
callerNum = name, "#ff6242", muted, talking, listenOnly, "freeswitch", System.currentTimeMillis(), floor, lastFloorTime)
|
||||||
}
|
}
|
||||||
|
|
||||||
def createFakeWebcamStreamFor(userId: String, subscribers: Set[String]): WebcamStream = {
|
def createFakeWebcamStreamFor(userId: String, subscribers: Set[String]): WebcamStream = {
|
||||||
|
@ -24,7 +24,7 @@ object TestDataGen {
|
|||||||
listenOnly: Boolean): VoiceUserState = {
|
listenOnly: Boolean): VoiceUserState = {
|
||||||
val voiceUserId = RandomStringGenerator.randomAlphanumericString(8)
|
val voiceUserId = RandomStringGenerator.randomAlphanumericString(8)
|
||||||
VoiceUserState(intId = user.id, voiceUserId = voiceUserId, callingWith, callerName = user.name,
|
VoiceUserState(intId = user.id, voiceUserId = voiceUserId, callingWith, callerName = user.name,
|
||||||
callerNum = user.name, muted, talking, listenOnly)
|
callerNum = user.name, "#ff6242", muted, talking, listenOnly)
|
||||||
}
|
}
|
||||||
|
|
||||||
def createFakeVoiceOnlyUser(callingWith: String, muted: Boolean, talking: Boolean,
|
def createFakeVoiceOnlyUser(callingWith: String, muted: Boolean, talking: Boolean,
|
||||||
@ -32,7 +32,7 @@ object TestDataGen {
|
|||||||
val voiceUserId = RandomStringGenerator.randomAlphanumericString(8)
|
val voiceUserId = RandomStringGenerator.randomAlphanumericString(8)
|
||||||
val intId = "v_" + RandomStringGenerator.randomAlphanumericString(16)
|
val intId = "v_" + RandomStringGenerator.randomAlphanumericString(16)
|
||||||
VoiceUserState(intId, voiceUserId = voiceUserId, callingWith, callerName = name,
|
VoiceUserState(intId, voiceUserId = voiceUserId, callingWith, callerName = name,
|
||||||
callerNum = name, muted, talking, listenOnly)
|
callerNum = name, "#ff6242", muted, talking, listenOnly)
|
||||||
}
|
}
|
||||||
|
|
||||||
def createFakeWebcamStreamFor(userId: String, subscribers: Set[String]): WebcamStream = {
|
def createFakeWebcamStreamFor(userId: String, subscribers: Set[String]): WebcamStream = {
|
||||||
|
@ -373,7 +373,7 @@ object GetVoiceUsersMeetingRespMsg {
|
|||||||
case class GetVoiceUsersMeetingRespMsg(header: BbbClientMsgHeader, body: GetVoiceUsersMeetingRespMsgBody) extends BbbCoreMsg
|
case class GetVoiceUsersMeetingRespMsg(header: BbbClientMsgHeader, body: GetVoiceUsersMeetingRespMsgBody) extends BbbCoreMsg
|
||||||
case class GetVoiceUsersMeetingRespMsgBody(users: Vector[VoiceConfUser])
|
case class GetVoiceUsersMeetingRespMsgBody(users: Vector[VoiceConfUser])
|
||||||
case class VoiceConfUser(intId: String, voiceUserId: String, callingWith: String, callerName: String,
|
case class VoiceConfUser(intId: String, voiceUserId: String, callingWith: String, callerName: String,
|
||||||
callerNum: String, muted: Boolean, talking: Boolean, listenOnly: Boolean)
|
callerNum: String, color: String, muted: Boolean, talking: Boolean, listenOnly: Boolean)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sent from client to add user to the presenter group of a meeting.
|
* Sent from client to add user to the presenter group of a meeting.
|
||||||
|
@ -408,7 +408,7 @@ case class UserJoinedVoiceConfEvtMsgBody(voiceConf: String, voiceUserId: String,
|
|||||||
object UserJoinedVoiceConfToClientEvtMsg { val NAME = "UserJoinedVoiceConfToClientEvtMsg" }
|
object UserJoinedVoiceConfToClientEvtMsg { val NAME = "UserJoinedVoiceConfToClientEvtMsg" }
|
||||||
case class UserJoinedVoiceConfToClientEvtMsg(header: BbbClientMsgHeader, body: UserJoinedVoiceConfToClientEvtMsgBody) extends BbbCoreMsg
|
case class UserJoinedVoiceConfToClientEvtMsg(header: BbbClientMsgHeader, body: UserJoinedVoiceConfToClientEvtMsgBody) extends BbbCoreMsg
|
||||||
case class UserJoinedVoiceConfToClientEvtMsgBody(voiceConf: String, intId: String, voiceUserId: String, callerName: String,
|
case class UserJoinedVoiceConfToClientEvtMsgBody(voiceConf: String, intId: String, voiceUserId: String, callerName: String,
|
||||||
callerNum: String, muted: Boolean,
|
callerNum: String, color: String, muted: Boolean,
|
||||||
talking: Boolean, callingWith: String, listenOnly: Boolean)
|
talking: Boolean, callingWith: String, listenOnly: Boolean)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -8,7 +8,7 @@ export default async function addDialInUser(meetingId, voiceUser) {
|
|||||||
const USER_CONFIG = Meteor.settings.public.user;
|
const USER_CONFIG = Meteor.settings.public.user;
|
||||||
const ROLE_VIEWER = USER_CONFIG.role_viewer;
|
const ROLE_VIEWER = USER_CONFIG.role_viewer;
|
||||||
|
|
||||||
const { intId, callerName } = voiceUser;
|
const { intId, callerName, color } = voiceUser;
|
||||||
|
|
||||||
const voiceOnlyUser = {
|
const voiceOnlyUser = {
|
||||||
intId,
|
intId,
|
||||||
@ -23,6 +23,7 @@ export default async function addDialInUser(meetingId, voiceUser) {
|
|||||||
presenter: false,
|
presenter: false,
|
||||||
locked: false, // TODO
|
locked: false, // TODO
|
||||||
avatar: '',
|
avatar: '',
|
||||||
|
color,
|
||||||
pin: false,
|
pin: false,
|
||||||
clientType: 'dial-in-user',
|
clientType: 'dial-in-user',
|
||||||
};
|
};
|
||||||
|
@ -70,6 +70,7 @@ export default async function addUser(meetingId, userData) {
|
|||||||
intId: userId,
|
intId: userId,
|
||||||
callerName: user.name,
|
callerName: user.name,
|
||||||
callerNum: '',
|
callerNum: '',
|
||||||
|
color: user.color,
|
||||||
muted: false,
|
muted: false,
|
||||||
talking: false,
|
talking: false,
|
||||||
callingWith: '',
|
callingWith: '',
|
||||||
|
@ -40,6 +40,7 @@ export default async function handleGetVoiceUsers({ body }, meetingId) {
|
|||||||
callerName: user.callerName,
|
callerName: user.callerName,
|
||||||
callerNum: user.callerNum,
|
callerNum: user.callerNum,
|
||||||
muted: user.muted,
|
muted: user.muted,
|
||||||
|
color: user.color,
|
||||||
talking: user.talking,
|
talking: user.talking,
|
||||||
callingWith: user.callingWith,
|
callingWith: user.callingWith,
|
||||||
listenOnly: user.listenOnly,
|
listenOnly: user.listenOnly,
|
||||||
|
@ -3,7 +3,6 @@ import Users from '/imports/api/users';
|
|||||||
import addDialInUser from '/imports/api/users/server/modifiers/addDialInUser';
|
import addDialInUser from '/imports/api/users/server/modifiers/addDialInUser';
|
||||||
import addVoiceUser from '../modifiers/addVoiceUser';
|
import addVoiceUser from '../modifiers/addVoiceUser';
|
||||||
|
|
||||||
|
|
||||||
export default async function handleJoinVoiceUser({ body }, meetingId) {
|
export default async function handleJoinVoiceUser({ body }, meetingId) {
|
||||||
const voiceUser = body;
|
const voiceUser = body;
|
||||||
voiceUser.joined = true;
|
voiceUser.joined = true;
|
||||||
@ -15,6 +14,7 @@ export default async function handleJoinVoiceUser({ body }, meetingId) {
|
|||||||
voiceUserId: String,
|
voiceUserId: String,
|
||||||
callerName: String,
|
callerName: String,
|
||||||
callerNum: String,
|
callerNum: String,
|
||||||
|
color: String,
|
||||||
muted: Boolean,
|
muted: Boolean,
|
||||||
talking: Boolean,
|
talking: Boolean,
|
||||||
callingWith: String,
|
callingWith: String,
|
||||||
|
@ -5,7 +5,6 @@ import removeVoiceUser from '../modifiers/removeVoiceUser';
|
|||||||
import updateVoiceUser from '../modifiers/updateVoiceUser';
|
import updateVoiceUser from '../modifiers/updateVoiceUser';
|
||||||
import addVoiceUser from '../modifiers/addVoiceUser';
|
import addVoiceUser from '../modifiers/addVoiceUser';
|
||||||
|
|
||||||
|
|
||||||
export default async function handleVoiceUsers({ header, body }) {
|
export default async function handleVoiceUsers({ header, body }) {
|
||||||
const { voiceUsers } = body;
|
const { voiceUsers } = body;
|
||||||
const { meetingId } = header;
|
const { meetingId } = header;
|
||||||
@ -38,6 +37,7 @@ export default async function handleVoiceUsers({ header, body }) {
|
|||||||
intId: voice.intId,
|
intId: voice.intId,
|
||||||
callerName: voice.callerName,
|
callerName: voice.callerName,
|
||||||
callerNum: voice.callerNum,
|
callerNum: voice.callerNum,
|
||||||
|
color: voice.color,
|
||||||
muted: voice.muted,
|
muted: voice.muted,
|
||||||
talking: voice.talking,
|
talking: voice.talking,
|
||||||
callingWith: voice.callingWith,
|
callingWith: voice.callingWith,
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import { check } from 'meteor/check';
|
import { check } from 'meteor/check';
|
||||||
import Logger from '/imports/startup/server/logger';
|
import Logger from '/imports/startup/server/logger';
|
||||||
import VoiceUsers from '/imports/api/voice-users';
|
import VoiceUsers from '/imports/api/voice-users';
|
||||||
import Users from '/imports/api/users';
|
|
||||||
import flat from 'flat';
|
import flat from 'flat';
|
||||||
|
|
||||||
export default async function addVoiceUser(meetingId, voiceUser) {
|
export default async function addVoiceUser(meetingId, voiceUser) {
|
||||||
@ -11,6 +10,7 @@ export default async function addVoiceUser(meetingId, voiceUser) {
|
|||||||
intId: String,
|
intId: String,
|
||||||
callerName: String,
|
callerName: String,
|
||||||
callerNum: String,
|
callerNum: String,
|
||||||
|
color: String,
|
||||||
muted: Boolean,
|
muted: Boolean,
|
||||||
talking: Boolean,
|
talking: Boolean,
|
||||||
callingWith: String,
|
callingWith: String,
|
||||||
@ -27,19 +27,12 @@ export default async function addVoiceUser(meetingId, voiceUser) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const modifier = {
|
const modifier = {
|
||||||
$set: Object.assign(
|
$set: {
|
||||||
{ meetingId, spoke: talking },
|
meetingId,
|
||||||
flat(voiceUser),
|
spoke: talking,
|
||||||
),
|
...flat(voiceUser),
|
||||||
};
|
|
||||||
|
|
||||||
const user = await Users.findOneAsync({ meetingId, userId: intId }, {
|
|
||||||
fields: {
|
|
||||||
color: 1,
|
|
||||||
},
|
},
|
||||||
});
|
};
|
||||||
|
|
||||||
if (user) modifier.$set.color = user.color;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const { numberAffected } = await VoiceUsers.upsertAsync(selector, modifier);
|
const { numberAffected } = await VoiceUsers.upsertAsync(selector, modifier);
|
||||||
|
Loading…
Reference in New Issue
Block a user