mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-04-28 14:29:19 +08:00
feat: system account send msg doesn't need friend verify (#3187)
This commit is contained in:
@@ -20,6 +20,7 @@ import (
|
||||
|
||||
"github.com/golang-jwt/jwt/v4"
|
||||
"github.com/openimsdk/open-im-server/v3/pkg/common/servererrs"
|
||||
"github.com/openimsdk/protocol/constant"
|
||||
"github.com/openimsdk/tools/mcontext"
|
||||
"github.com/openimsdk/tools/utils/datautil"
|
||||
)
|
||||
@@ -55,3 +56,7 @@ func CheckAdmin(ctx context.Context, imAdminUserID []string) error {
|
||||
func IsManagerUserID(opUserID string, imAdminUserID []string) bool {
|
||||
return datautil.Contain(opUserID, imAdminUserID...)
|
||||
}
|
||||
|
||||
func CheckSystemAccount(ctx context.Context, level int32) bool {
|
||||
return level >= constant.AppAdmin
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user