DeleteRoom now removes all participants in the room

This commit is contained in:
David Zhao
2021-04-21 22:30:29 -07:00
parent 4725872884
commit 0dddc3c0be
5 changed files with 47 additions and 12 deletions
+5
View File
@@ -395,6 +395,11 @@ func (r *RoomManager) handleRTCMessage(roomName, identity string, msg *livekit.R
if rm.UpdateParticipant.Permission != nil {
participant.SetPermission(rm.UpdateParticipant.Permission)
}
case *livekit.RTCNodeMessage_DeleteRoom:
for _, p := range room.GetParticipants() {
_ = p.Close()
}
room.Close()
}
}