Remove accessors for group description fields.

Consult the description directly.
This commit is contained in:
Juliusz Chroboczek
2021-10-30 18:32:49 +02:00
parent 06ee4cc30f
commit 019f365981
4 changed files with 10 additions and 39 deletions
+3 -3
View File
@@ -822,7 +822,7 @@ func getGroupStatus(g *group.Group) map[string]interface{} {
status["locked"] = message
}
}
if dn := g.DisplayName(); dn != "" {
if dn := g.Description().DisplayName; dn != "" {
status["displayName"] = dn
}
return status
@@ -1265,7 +1265,7 @@ func setPermissions(g *group.Group, id string, perm string) error {
switch perm {
case "op":
c.permissions.Op = true
if g.AllowRecording() {
if g.Description().AllowRecording {
c.permissions.Record = true
}
case "unop":
@@ -1360,7 +1360,7 @@ func handleClientMessage(c *webClient, m clientMessage) error {
Value: s,
})
}
if redirect := g.Redirect(); redirect != "" {
if redirect := g.Description().Redirect; redirect != "" {
// We normally redirect at the HTTP level, but the group
// description could have been edited in the meantime.
return c.write(clientMessage{