feat: del the manager configure and it's initializestatement (#1830)

* fix: del the manager config and manger init statement

* fix: fix the Manger judge condition

* fix: fix revokeMsg error

* fix: find erors

* fix: find error

* fix: fix the AdminAccount error

* fix: del the debug statement
This commit is contained in:
Brabem
2024-01-29 19:57:37 +08:00
committed by GitHub
parent f94d8af737
commit 32cd79044b
8 changed files with 28 additions and 30 deletions
+8 -1
View File
@@ -111,6 +111,13 @@ func (m *msgServer) RevokeMsg(ctx context.Context, req *msg.RevokeMsgReq) (*msg.
return nil, err
}
revokerUserID := mcontext.GetOpUserID(ctx)
var flag bool
if len(config.Config.Manager.UserID) > 0 {
flag = utils.Contain(revokerUserID, config.Config.Manager.UserID...)
}
if len(config.Config.Manager.UserID) == 0 && len(config.Config.IMAdmin.UserID) > 0 {
flag = utils.Contain(revokerUserID, config.Config.IMAdmin.UserID...)
}
tips := sdkws.RevokeMsgTips{
RevokerUserID: revokerUserID,
ClientMsgID: msgs[0].ClientMsgID,
@@ -118,7 +125,7 @@ func (m *msgServer) RevokeMsg(ctx context.Context, req *msg.RevokeMsgReq) (*msg.
Seq: req.Seq,
SesstionType: msgs[0].SessionType,
ConversationID: req.ConversationID,
IsAdminRevoke: utils.Contain(revokerUserID, config.Config.Manager.UserID...),
IsAdminRevoke: flag,
}
var recvID string
if msgs[0].SessionType == constant.SuperGroupChatType {