mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
revoke userID
This commit is contained in:
parent
e2be0fc093
commit
bedd554269
@ -3,7 +3,6 @@ package msg
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"github.com/google/uuid"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
|
||||||
@ -79,7 +78,6 @@ func (m *msgServer) RevokeMsg(ctx context.Context, req *msg.RevokeMsgReq) (*msg.
|
|||||||
}
|
}
|
||||||
now := time.Now().UnixMilli()
|
now := time.Now().UnixMilli()
|
||||||
err = m.MsgDatabase.RevokeMsg(ctx, req.ConversationID, req.Seq, &unRelationTb.RevokeModel{
|
err = m.MsgDatabase.RevokeMsg(ctx, req.ConversationID, req.Seq, &unRelationTb.RevokeModel{
|
||||||
ID: uuid.New().String(),
|
|
||||||
Role: role,
|
Role: role,
|
||||||
UserID: req.UserID,
|
UserID: req.UserID,
|
||||||
Nickname: user.Nickname,
|
Nickname: user.Nickname,
|
||||||
|
@ -21,7 +21,6 @@ type MsgDocModel struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type RevokeModel struct {
|
type RevokeModel struct {
|
||||||
ID string `bson:"id"`
|
|
||||||
Role int32 `bson:"role"`
|
Role int32 `bson:"role"`
|
||||||
UserID string `bson:"user_id"`
|
UserID string `bson:"user_id"`
|
||||||
Nickname string `bson:"nickname"`
|
Nickname string `bson:"nickname"`
|
||||||
|
@ -248,7 +248,7 @@ func (m *MsgMongoDriver) GetMsgBySeqIndexIn1Doc(ctx context.Context, userID stri
|
|||||||
}
|
}
|
||||||
if msg.Revoke != nil {
|
if msg.Revoke != nil {
|
||||||
revokeContent := sdkws.MessageRevokedContent{
|
revokeContent := sdkws.MessageRevokedContent{
|
||||||
RevokerID: msg.Revoke.ID,
|
RevokerID: msg.Revoke.UserID,
|
||||||
RevokerRole: msg.Revoke.Role,
|
RevokerRole: msg.Revoke.Role,
|
||||||
ClientMsgID: msg.Msg.ClientMsgID,
|
ClientMsgID: msg.Msg.ClientMsgID,
|
||||||
RevokerNickname: msg.Revoke.Nickname,
|
RevokerNickname: msg.Revoke.Nickname,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user