1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-12-22 15:25:48 +01:00

Enforce clearchat permissions in the server.

It was only being enforced in the client.
This commit is contained in:
Juliusz Chroboczek 2024-05-08 15:38:51 +02:00
parent e59880e267
commit ea4f14ee0a

View file

@ -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",