mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-04-29 18:34:04 +08:00
fix: checkAdmin
This commit is contained in:
parent
e674b85328
commit
605f620da5
@ -18,6 +18,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"slices"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
@ -917,7 +918,7 @@ func (g *NotificationSender) getGroupInfos(ctx context.Context, groupIDs []strin
|
|||||||
|
|
||||||
func (g *NotificationSender) GroupMemberInfoSetNotificationBulk(ctx context.Context, groupIDs []string, changedUserInfo *sdkws.UserInfo) error {
|
func (g *NotificationSender) GroupMemberInfoSetNotificationBulk(ctx context.Context, groupIDs []string, changedUserInfo *sdkws.UserInfo) error {
|
||||||
opUserID := mcontext.GetOpUserID(ctx)
|
opUserID := mcontext.GetOpUserID(ctx)
|
||||||
opIsAdmin := authverify.CheckUserIsAdmin(ctx, opUserID)
|
opIsAdmin := slices.Contains(g.config.Share.IMAdminUserID, opUserID)
|
||||||
|
|
||||||
groupInfos, err := g.getGroupInfos(ctx, groupIDs)
|
groupInfos, err := g.getGroupInfos(ctx, groupIDs)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user