Commit ea4f14ee authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Enforce clearchat permissions in the server.

It was only being enforced in the client.
parent e59880e2
......@@ -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",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment