Skip to content

Commit

Permalink
fix: 修改用户级别判断信息
Browse files Browse the repository at this point in the history
  • Loading branch information
rehiy committed Mar 18, 2024
1 parent 6689fd3 commit e73c462
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
13 changes: 7 additions & 6 deletions wclient/robot/receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,17 @@ func whiteLimit(msg *wcferry.WxMsg) bool {
return false
}

// 验证名单
// 已注册用户
if msg.IsGroup {
room, _ := chatroom.Fetch(&chatroom.FetchParam{Roomid: msg.Roomid})
if room.Level < 2 {
return true
if room.Level > 1 {
return false
}
} else if up.Level < 2 {
return true
} else if up.Level > 1 {
return false
}

return false
// 受限制用户
return true

}
4 changes: 2 additions & 2 deletions webview/src/openapi/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ export const BadwordLevels: Record<number, OptionData> = {
};

export const RoomLevels: Record<number, OptionData> = {
'-1': { name: '未限制' },
'-1': { name: '未注册' },
1: { name: '待验证' },
2: { name: '已注册' },
};

export const UserLevels: Record<number, OptionData> = {
'-1': { name: '未限制' },
'-1': { name: '未注册' },
1: { name: '待验证' },
2: { name: '已注册' },
7: { name: '管理员' },
Expand Down

0 comments on commit e73c462

Please sign in to comment.