From 97a5bf60ad9e771d970dd7e79d0ddca694c40d99 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Fri, 30 Jul 2021 19:43:23 +0200 Subject: [PATCH] Send the locked user-friendly message in the group status. --- rtpconn/webclient.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rtpconn/webclient.go b/rtpconn/webclient.go index b9e1873..e11ff2e 100644 --- a/rtpconn/webclient.go +++ b/rtpconn/webclient.go @@ -797,8 +797,12 @@ func (c *webClient) PushConn(g *group.Group, id string, up conn.Up, tracks []con func getGroupStatus(g *group.Group) map[string]interface{} { status := make(map[string]interface{}) - if locked, _ := g.Locked(); locked { - status["locked"] = true + if locked, message := g.Locked(); locked { + if message == "" { + status["locked"] = true + } else { + status["locked"] = message + } } if dn := g.DisplayName(); dn != "" { status["displayName"] = dn