X-Git-Url: https://git.r.bdr.sh/rbdr/mobius/blobdiff_plain/b8c0a83a87eb108e8dfe02fd08c234087f166f04..52f2aea827bed9c6d26a72072b16857bdc6f7743:/hotline/transaction_handlers.go diff --git a/hotline/transaction_handlers.go b/hotline/transaction_handlers.go index 412868c..85879a4 100644 --- a/hotline/transaction_handlers.go +++ b/hotline/transaction_handlers.go @@ -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)