fix: fix group getGroupMemberIDs is 0 err (#2108)

This commit is contained in:
Xinwei Xiong
2024-03-18 10:35:19 +08:00
committed by GitHub
parent 4cd42d7e19
commit 4ed575a53c
5 changed files with 24 additions and 21 deletions
+1
View File
@@ -60,6 +60,7 @@ func CheckAdmin(ctx context.Context, config *config.GlobalConfig) error {
}
return errs.ErrNoPermission.Wrap(fmt.Sprintf("user %s is not admin userID", mcontext.GetOpUserID(ctx)))
}
func CheckIMAdmin(ctx context.Context, config *config.GlobalConfig) error {
if utils.IsContain(mcontext.GetOpUserID(ctx), config.IMAdmin.UserID) {
return nil