Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix inserts userId to the EndMeeting function calls. #11390

Merged
merged 1 commit into from
Feb 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ trait EndBreakoutRoomInternalMsgHdlr extends HandlerHelpers {

def handleEndBreakoutRoomInternalMsg(msg: EndBreakoutRoomInternalMsg): Unit = {
log.info("Breakout room {} ended by parent meeting {}.", msg.breakoutId, msg.parentId)
sendEndMeetingDueToExpiry(MeetingEndReason.ENDED_BY_PARENT, eventBus, outGW, liveMeeting)
sendEndMeetingDueToExpiry(MeetingEndReason.ENDED_BY_PARENT, eventBus, outGW, liveMeeting, "system")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ trait LogoutAndEndMeetingCmdMsgHdlr extends RightsManagementTrait {
endAllBreakoutRooms(eventBus, liveMeeting, state)
log.info("Meeting {} ended by user [{}, {}} when logging out.", liveMeeting.props.meetingProp.intId,
u.intId, u.name)
sendEndMeetingDueToExpiry(MeetingEndReason.ENDED_AFTER_USER_LOGGED_OUT, eventBus, outGW, liveMeeting)
sendEndMeetingDueToExpiry(MeetingEndReason.ENDED_AFTER_USER_LOGGED_OUT, eventBus, outGW, liveMeeting, u.intId)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,18 +152,18 @@ trait HandlerHelpers extends SystemConfiguration {
newState
}

def endMeeting(outGW: OutMsgRouter, liveMeeting: LiveMeeting, reason: String): Unit = {
def buildMeetingEndingEvtMsg(meetingId: String): BbbCommonEnvCoreMsg = {
val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, meetingId, "not-used")
def endMeeting(outGW: OutMsgRouter, liveMeeting: LiveMeeting, reason: String, userId: String): Unit = {
def buildMeetingEndingEvtMsg(meetingId: String, userId: String): BbbCommonEnvCoreMsg = {
val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, meetingId, userId)
val envelope = BbbCoreEnvelope(MeetingEndingEvtMsg.NAME, routing)
val body = MeetingEndingEvtMsgBody(meetingId, reason)
val header = BbbClientMsgHeader(MeetingEndingEvtMsg.NAME, meetingId, "not-used")
val header = BbbClientMsgHeader(MeetingEndingEvtMsg.NAME, meetingId, userId)
val event = MeetingEndingEvtMsg(header, body)

BbbCommonEnvCoreMsg(envelope, event)
}

val endingEvent = buildMeetingEndingEvtMsg(liveMeeting.props.meetingProp.intId)
val endingEvent = buildMeetingEndingEvtMsg(liveMeeting.props.meetingProp.intId, userId)

// Broadcast users the meeting will end
outGW.send(endingEvent)
Expand Down Expand Up @@ -217,8 +217,8 @@ trait HandlerHelpers extends SystemConfiguration {
state.update(None)
}

def sendEndMeetingDueToExpiry(reason: String, eventBus: InternalEventBus, outGW: OutMsgRouter, liveMeeting: LiveMeeting): Unit = {
endMeeting(outGW, liveMeeting, reason)
def sendEndMeetingDueToExpiry(reason: String, eventBus: InternalEventBus, outGW: OutMsgRouter, liveMeeting: LiveMeeting, userId: String): Unit = {
endMeeting(outGW, liveMeeting, reason, userId)
notifyParentThatBreakoutEnded(eventBus, liveMeeting)
ejectAllUsersFromVoiceConf(outGW, liveMeeting)
destroyMeeting(eventBus, liveMeeting.props.meetingProp.intId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,8 @@ class MeetingActor(
if (authedUsers.isEmpty) {
sendEndMeetingDueToExpiry(
MeetingEndReason.ENDED_DUE_TO_NO_AUTHED_USER,
eventBus, outGW, liveMeeting
eventBus, outGW, liveMeeting,
"system"
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ trait MeetingExpiryTrackerHelper extends HandlerHelpers {
expireReason <- reason
} yield {
endAllBreakoutRooms(eventBus, liveMeeting, state)
sendEndMeetingDueToExpiry(expireReason, eventBus, outGW, liveMeeting)
sendEndMeetingDueToExpiry(expireReason, eventBus, outGW, liveMeeting, "system")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ trait EndMeetingSysCmdMsgHdlr extends HandlerHelpers {
def handleEndMeeting(msg: EndMeetingSysCmdMsg, state: MeetingState2x): Unit = {
endAllBreakoutRooms(eventBus, liveMeeting, state)
log.info("Meeting {} ended by from API.", msg.body.meetingId)
sendEndMeetingDueToExpiry(MeetingEndReason.ENDED_FROM_API, eventBus, outGW, liveMeeting)
sendEndMeetingDueToExpiry(MeetingEndReason.ENDED_FROM_API, eventBus, outGW, liveMeeting, "system")
}

}