1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-10 02:35:58 +01:00

Send the locked user-friendly message in the group status.

This commit is contained in:
Juliusz Chroboczek 2021-07-30 19:43:23 +02:00
parent 3b98e123e0
commit 97a5bf60ad

View file

@ -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{} { func getGroupStatus(g *group.Group) map[string]interface{} {
status := make(map[string]interface{}) status := make(map[string]interface{})
if locked, _ := g.Locked(); locked { if locked, message := g.Locked(); locked {
if message == "" {
status["locked"] = true status["locked"] = true
} else {
status["locked"] = message
}
} }
if dn := g.DisplayName(); dn != "" { if dn := g.DisplayName(); dn != "" {
status["displayName"] = dn status["displayName"] = dn