feat: 后台增加开放消息开关
关闭后前台隐藏私聊/群聊入口并由后端拦截;同步去掉公告页重复计数胶囊。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -279,7 +279,12 @@ func (h *Handlers) Me(c *gin.Context) {
|
||||
if n, err := h.Notification.UnreadCount(claims.ID); err == nil {
|
||||
unread = n
|
||||
}
|
||||
chatUnread := h.Chat.TotalUnread(claims.ID)
|
||||
chatUnread := int64(0)
|
||||
if h.Setting != nil && h.Chat != nil {
|
||||
if allow, err := h.Setting.AllowMessages(); err == nil && allow {
|
||||
chatUnread = h.Chat.TotalUnread(claims.ID)
|
||||
}
|
||||
}
|
||||
// 板块管理员带出授权板块,供前端菜单/按钮按板块范围渲染
|
||||
var boardIDs []uint
|
||||
if user.Role == model.RoleBoardAdmin {
|
||||
|
||||
Reference in New Issue
Block a user