Enforce clearchat permissions in the server.
It was only being enforced in the client.
This commit is contained in:
@@ -1619,6 +1619,9 @@ func handleClientMessage(c *webClient, m clientMessage) error {
|
||||
}
|
||||
switch m.Kind {
|
||||
case "clearchat":
|
||||
if !member("op", c.permissions) {
|
||||
return c.error(group.UserError("not authorised"))
|
||||
}
|
||||
g.ClearChatHistory()
|
||||
m := clientMessage{
|
||||
Type: "usermessage",
|
||||
|
||||
Reference in New Issue
Block a user