mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-04-28 14:29:19 +08:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user