mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-03 19:02:31 +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 {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
log.ZDebug(ctx, "RevokeMsg", "Length", req)
|
||||||
_, _, msgs, err := m.MsgDatabase.GetMsgBySeqs(ctx, req.UserID, req.ConversationID, []int64{req.Seq})
|
_, _, msgs, err := m.MsgDatabase.GetMsgBySeqs(ctx, req.UserID, req.ConversationID, []int64{req.Seq})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
@ -17,6 +17,7 @@ package authverify
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/OpenIMSDK/tools/log"
|
||||||
|
|
||||||
"github.com/OpenIMSDK/tools/errs"
|
"github.com/OpenIMSDK/tools/errs"
|
||||||
"github.com/OpenIMSDK/tools/mcontext"
|
"github.com/OpenIMSDK/tools/mcontext"
|
||||||
@ -35,12 +36,14 @@ func Secret() jwt.Keyfunc {
|
|||||||
|
|
||||||
func CheckAccessV3(ctx context.Context, ownerUserID string) (err error) {
|
func CheckAccessV3(ctx context.Context, ownerUserID string) (err error) {
|
||||||
opUserID := mcontext.GetOpUserID(ctx)
|
opUserID := mcontext.GetOpUserID(ctx)
|
||||||
|
log.ZDebug(ctx, "CheckAcessV3", "Length", len(config.Config.Manager.UserID))
|
||||||
if utils.IsContain(opUserID, config.Config.Manager.UserID) {
|
if utils.IsContain(opUserID, config.Config.Manager.UserID) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if utils.IsContain(opUserID, config.Config.IMAdmin.UserID) {
|
if utils.IsContain(opUserID, config.Config.IMAdmin.UserID) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
log.ZDebug(ctx, "CheckAcessV3CheckAcessV3CheckAcessV3", "Length", len(config.Config.IMAdmin.UserID))
|
||||||
if opUserID == ownerUserID {
|
if opUserID == ownerUserID {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user