mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-02 18:34:29 +08:00
fix: fix revokeMsg error
This commit is contained in:
parent
66e9929e92
commit
19f9c49626
@ -51,6 +51,7 @@ func (m *msgServer) RevokeMsg(ctx context.Context, req *msg.RevokeMsgReq) (*msg.
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
log.ZDebug(ctx, "RevokeMsg", "Length", req)
|
||||
_, _, msgs, err := m.MsgDatabase.GetMsgBySeqs(ctx, req.UserID, req.ConversationID, []int64{req.Seq})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@ -17,6 +17,7 @@ package authverify
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/OpenIMSDK/tools/log"
|
||||
|
||||
"github.com/OpenIMSDK/tools/errs"
|
||||
"github.com/OpenIMSDK/tools/mcontext"
|
||||
@ -35,12 +36,14 @@ func Secret() jwt.Keyfunc {
|
||||
|
||||
func CheckAccessV3(ctx context.Context, ownerUserID string) (err error) {
|
||||
opUserID := mcontext.GetOpUserID(ctx)
|
||||
log.ZDebug(ctx, "CheckAcessV3", "Length", len(config.Config.Manager.UserID))
|
||||
if utils.IsContain(opUserID, config.Config.Manager.UserID) {
|
||||
return nil
|
||||
}
|
||||
if utils.IsContain(opUserID, config.Config.IMAdmin.UserID) {
|
||||
return nil
|
||||
}
|
||||
log.ZDebug(ctx, "CheckAcessV3CheckAcessV3CheckAcessV3", "Length", len(config.Config.IMAdmin.UserID))
|
||||
if opUserID == ownerUserID {
|
||||
return nil
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user