feat: enforce friend add and curfew policies
This commit is contained in:
@@ -1496,6 +1496,10 @@ func (t *Topic) handlePubBroadcast(msg *ClientComMessage) {
|
||||
msg.Pub.Content = content
|
||||
}
|
||||
if msg.sess != nil && msg.sess.authLvl != auth.LevelRoot && !isCall {
|
||||
if decision := imMessageCurfewDecision(t.tenantID, msg.sess.tenantCode, asUid, t.name, t.cat); !decision.Allowed {
|
||||
msg.sess.queueOut(imCurfewPolicyReply(msg, decision))
|
||||
return
|
||||
}
|
||||
scene := moderation.ScenePrivateMessage
|
||||
if t.cat == types.TopicCatGrp {
|
||||
scene = moderation.SceneGroupMessage
|
||||
|
||||
Reference in New Issue
Block a user