]> git.r.bdr.sh - rbdr/mobius/blobdiff - hotline/transaction_handlers.go
Improve documentation of access control flags
[rbdr/mobius] / hotline / transaction_handlers.go
index 412868c8d62242e0118cce93b797e91709ab6e8b..85879a4de1bc714c0a9d18e56e9e610bf0ad5f91 100644 (file)
@@ -299,6 +299,11 @@ func HandleChatSend(cc *ClientConn, t *Transaction) (res []Transaction, err erro
 // Fields used in the reply:
 // None
 func HandleSendInstantMsg(cc *ClientConn, t *Transaction) (res []Transaction, err error) {
+       if !cc.Authorize(accessSendPrivMsg) {
+               res = append(res, cc.NewErrReply(t, "You are not allowed to send private messages."))
+               return res, err
+       }
+
        msg := t.GetField(fieldData)
        ID := t.GetField(fieldUserID)