mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-08 11:05:59 +08:00
Merge branch 'main' into localcache
# Conflicts: # internal/push/push_to_client.go
This commit is contained in:
@@ -106,6 +106,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,
|
||||
@@ -113,7 +120,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