Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
拒绝非超管邀请
Browse files Browse the repository at this point in the history
  • Loading branch information
axiangcoding committed Mar 24, 2023
1 parent 835c175 commit 3e2eb37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api-system/internal/service/cqhttp_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ func handleAddGroup(event *cqhttp.CommonEvent) {
userId := event.UserId
groupConfig := MustFindGroupConfig(groupId)
userConfig := MustFindUserConfig(userId)
if (groupConfig == nil || !(*groupConfig.Banned)) && (userConfig == nil || !(*userConfig.Banned)) {
if (groupConfig == nil || !(*groupConfig.Banned)) && (userConfig == nil || !(*userConfig.Banned)) && (userConfig.SuperAdmin != nil && *userConfig.SuperAdmin) {
cqhttp.MustAcceptInviteToGroup(event.Flag, event.SubType, true, "")
} else {
logging.L().Warn("application for joining the group was rejected",
Expand Down

0 comments on commit 3e2eb37

Please sign in to comment.