We need to update the registered user's list when role and waitingForAcceptance change because reconnection doesn't trigger a userLeaving msg anymore
This commit is contained in:
parent
3a2d6e52b8
commit
15acb57b17
@ -263,6 +263,7 @@ trait UsersApp {
|
|||||||
users.getUser(msg.userID) foreach {user =>
|
users.getUser(msg.userID) foreach {user =>
|
||||||
val uvo = user.copy(role=msg.role)
|
val uvo = user.copy(role=msg.role)
|
||||||
users.addUser(uvo)
|
users.addUser(uvo)
|
||||||
|
updateRegUser(uvo)
|
||||||
val userRole = if(msg.role == Role.MODERATOR) "MODERATOR" else "VIEWER"
|
val userRole = if(msg.role == Role.MODERATOR) "MODERATOR" else "VIEWER"
|
||||||
outGW.send(new UserRoleChange(meetingID, recorded, msg.userID, userRole))
|
outGW.send(new UserRoleChange(meetingID, recorded, msg.userID, userRole))
|
||||||
}
|
}
|
||||||
@ -326,7 +327,6 @@ trait UsersApp {
|
|||||||
user foreach { u =>
|
user foreach { u =>
|
||||||
logger.info("User left meeting: mid=[" + meetingID + "] uid=[" + u.userID + "]")
|
logger.info("User left meeting: mid=[" + meetingID + "] uid=[" + u.userID + "]")
|
||||||
outGW.send(new UserLeft(msg.meetingID, recorded, u))
|
outGW.send(new UserLeft(msg.meetingID, recorded, u))
|
||||||
updateRegUser(u)
|
|
||||||
|
|
||||||
if (u.presenter) {
|
if (u.presenter) {
|
||||||
/* The current presenter has left the meeting. Find a moderator and make
|
/* The current presenter has left the meeting. Find a moderator and make
|
||||||
@ -498,6 +498,7 @@ trait UsersApp {
|
|||||||
if (msg.response == true) {
|
if (msg.response == true) {
|
||||||
val nu = user.copy(waitingForAcceptance=false)
|
val nu = user.copy(waitingForAcceptance=false)
|
||||||
users.addUser(nu)
|
users.addUser(nu)
|
||||||
|
updateRegUser(nu)
|
||||||
outGW.send(new UserJoined(meetingID, recorded, nu))
|
outGW.send(new UserJoined(meetingID, recorded, nu))
|
||||||
} else {
|
} else {
|
||||||
outGW.send(new GuestAccessDenied(meetingID, recorded, user.userID))
|
outGW.send(new GuestAccessDenied(meetingID, recorded, user.userID))
|
||||||
|
Loading…
Reference in New Issue
Block a user