diff --git a/internal/rpc/msg/revoke.go b/internal/rpc/msg/revoke.go index 746017940..bbdfb9bd0 100644 --- a/internal/rpc/msg/revoke.go +++ b/internal/rpc/msg/revoke.go @@ -3,7 +3,6 @@ package msg import ( "context" "encoding/json" - "github.com/google/uuid" "time" "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() err = m.MsgDatabase.RevokeMsg(ctx, req.ConversationID, req.Seq, &unRelationTb.RevokeModel{ - ID: uuid.New().String(), Role: role, UserID: req.UserID, Nickname: user.Nickname, diff --git a/pkg/common/db/table/unrelation/msg.go b/pkg/common/db/table/unrelation/msg.go index 3f02d8a58..e2ce3cb0a 100644 --- a/pkg/common/db/table/unrelation/msg.go +++ b/pkg/common/db/table/unrelation/msg.go @@ -21,7 +21,6 @@ type MsgDocModel struct { } type RevokeModel struct { - ID string `bson:"id"` Role int32 `bson:"role"` UserID string `bson:"user_id"` Nickname string `bson:"nickname"` diff --git a/pkg/common/db/unrelation/msg.go b/pkg/common/db/unrelation/msg.go index 22d10df22..13aeeca2d 100644 --- a/pkg/common/db/unrelation/msg.go +++ b/pkg/common/db/unrelation/msg.go @@ -248,7 +248,7 @@ func (m *MsgMongoDriver) GetMsgBySeqIndexIn1Doc(ctx context.Context, userID stri } if msg.Revoke != nil { revokeContent := sdkws.MessageRevokedContent{ - RevokerID: msg.Revoke.ID, + RevokerID: msg.Revoke.UserID, RevokerRole: msg.Revoke.Role, ClientMsgID: msg.Msg.ClientMsgID, RevokerNickname: msg.Revoke.Nickname,