feat: add friend add and curfew controls
This commit is contained in:
@@ -93,6 +93,38 @@ type ModerationPolicyRes struct {
|
||||
BlockMessage string `json:"block_message"`
|
||||
}
|
||||
|
||||
type SecurityPolicyReq struct {
|
||||
g.Meta `path:"/internal/im-config/tenants/{code}/security-policy" method:"get" tags:"IM内部配置" summary:"获取商户安全策略"`
|
||||
Code string `json:"code" in:"path" dc:"商户编码"`
|
||||
}
|
||||
|
||||
type SecurityPolicyRes struct {
|
||||
TenantID int64 `json:"tenant_id"`
|
||||
TenantCode string `json:"tenant_code"`
|
||||
PolicyVersion uint `json:"policy_version"`
|
||||
GlobalFriendEnabled bool `json:"global_friend_enabled"`
|
||||
FriendDisabledPolicy map[string]interface{} `json:"friend_disabled_policy"`
|
||||
MessageCurfewEnabled bool `json:"message_curfew_enabled"`
|
||||
CurfewRules []*SecurityCurfewRuleRes `json:"curfew_rules"`
|
||||
}
|
||||
|
||||
type SecurityCurfewRuleRes struct {
|
||||
RuleCode string `json:"rule_code"`
|
||||
RuleName string `json:"rule_name"`
|
||||
DateType string `json:"date_type"`
|
||||
CustomDates []string `json:"custom_dates"`
|
||||
Weekdays []int `json:"weekdays"`
|
||||
Timezone string `json:"timezone"`
|
||||
StartTime string `json:"start_time"`
|
||||
EndTime string `json:"end_time"`
|
||||
Scope string `json:"scope"`
|
||||
WhitelistUserIds []string `json:"whitelist_user_ids"`
|
||||
WhitelistGroupIds []string `json:"whitelist_group_ids"`
|
||||
Message string `json:"message"`
|
||||
Status int `json:"status"`
|
||||
Sort int `json:"sort"`
|
||||
}
|
||||
|
||||
type SensitiveWordsReq struct {
|
||||
g.Meta `path:"/internal/im-config/tenants/{code}/sensitive-words" method:"get" tags:"IM内部配置" summary:"获取商户有效敏感词"`
|
||||
Code string `json:"code" in:"path" dc:"商户编码"`
|
||||
|
||||
@@ -99,6 +99,13 @@ type AdjustGroupReq struct {
|
||||
|
||||
type AdjustGroupRes struct{}
|
||||
|
||||
type FriendAddReq struct {
|
||||
g.Meta `path:"/imUser/friendAdd" method:"post" tags:"IM用户" summary:"设置IM用户加好友开关"`
|
||||
sysin.ImUserFriendAddInp
|
||||
}
|
||||
|
||||
type FriendAddRes struct{}
|
||||
|
||||
type IPWhitelistReq struct {
|
||||
g.Meta `path:"/imUser/ipWhitelist" method:"get" tags:"IM用户" summary:"获取IM用户IP白名单"`
|
||||
sysin.ImUserIPWhitelistInp
|
||||
|
||||
Reference in New Issue
Block a user