Admin APIs for participant management (#13)
* stubs for room admin APIs * room store APIs to persist participants * participant persistence * updated protobufs * implemented APIs to mute/remove/etc * fixed mute handling
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package routing
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/thoas/go-funk"
|
||||
@@ -24,3 +26,13 @@ func GetAvailableNodes(nodes []*livekit.Node) []*livekit.Node {
|
||||
func participantKey(roomName, identity string) string {
|
||||
return roomName + "|" + identity
|
||||
}
|
||||
|
||||
func parseParticipantKey(pkey string) (roomName string, identity string, err error) {
|
||||
parts := strings.Split(pkey, "|")
|
||||
if len(parts) != 2 {
|
||||
err = errors.New("invalid participant key")
|
||||
return
|
||||
}
|
||||
|
||||
return parts[0], parts[1], nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user