diff --git a/internal/api/msg.go b/internal/api/msg.go index 2af620494..235e1e176 100644 --- a/internal/api/msg.go +++ b/internal/api/msg.go @@ -119,18 +119,6 @@ func (m *Message) PullMsgBySeqs(c *gin.Context) { a2r.Call(msg.MsgClient.PullMessageBySeqs, m.client, c) } -func (m *Message) DelMsg(c *gin.Context) { - a2r.Call(msg.MsgClient.DelMsgs, m.client, c) -} - -func (m *Message) DelSuperGroupMsg(c *gin.Context) { - a2r.Call(msg.MsgClient.DelSuperGroupMsg, m.client, c) -} - -func (m *Message) ClearMsg(c *gin.Context) { - a2r.Call(msg.MsgClient.ClearMsg, m.client, c) -} - func (m *Message) RevokeMsg(c *gin.Context) { a2r.Call(msg.MsgClient.RevokeMsg, m.client, c) } diff --git a/internal/api/route.go b/internal/api/route.go index daad8edbe..420b1e9fe 100644 --- a/internal/api/route.go +++ b/internal/api/route.go @@ -139,9 +139,7 @@ func NewGinRouter(zk discoveryregistry.SvcDiscoveryRegistry, rdb redis.Universal msgGroup.POST("/newest_seq", m.GetSeq) msgGroup.POST("/send_msg", m.SendMessage) msgGroup.POST("/pull_msg_by_seq", m.PullMsgBySeqs) - msgGroup.POST("/del_msg", m.DelMsg) - msgGroup.POST("/del_super_group_msg", m.DelSuperGroupMsg) - msgGroup.POST("/clear_msg", m.ClearMsg) + // todo del msg route msgGroup.POST("/revoke_msg", m.RevokeMsg) msgGroup.POST("/batch_send_msg", m.ManagementBatchSendMsg) diff --git a/internal/msgtransfer/online_msg_to_mongo_handler.go b/internal/msgtransfer/online_msg_to_mongo_handler.go index 85f7211cc..ab5a4e35d 100644 --- a/internal/msgtransfer/online_msg_to_mongo_handler.go +++ b/internal/msgtransfer/online_msg_to_mongo_handler.go @@ -2,9 +2,6 @@ package msgtransfer import ( "context" - "encoding/json" - "errors" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" @@ -66,36 +63,36 @@ func (mc *OnlineHistoryMongoConsumerHandler) handleChatWs2Mongo(ctx context.Cont log.ZError(ctx, "DelMsgBySeqs", err, "userIDs", deleteMessageTips.UserID, "seqs", deleteMessageTips.Seqs, "totalUnExistSeqs", totalUnExistSeqs) continue } - case constant.MsgRevokeNotification: - var elem sdkws.NotificationElem - if err := json.Unmarshal(v.Content, &elem); err != nil { - log.ZError(ctx, "json.Unmarshal NotificationElem", err, "content", string(v.Content)) - continue - } - var tips sdkws.RevokeMsgTips - if err := json.Unmarshal([]byte(elem.Detail), &tips); err != nil { - log.ZError(ctx, "json.Unmarshal RevokeMsgTips", err, "content", string(v.Content)) - continue - } - msgs, err := mc.msgDatabase.GetMsgBySeqs(ctx, tips.ConversationID, []int64{tips.Seq}) - if err != nil { - log.ZError(ctx, "GetMsgBySeqs", err, "conversationID", tips.ConversationID, "seq", tips.Seq) - continue - } - if len(msgs) == 0 { - log.ZError(ctx, "GetMsgBySeqs empty", errors.New("seq not found"), "conversationID", tips.ConversationID, "seq", tips.Seq) - continue - } - msgs[0].Content = []byte(elem.Detail) - data, err := proto.Marshal(msgs[0]) - if err != nil { - log.ZError(ctx, "proto.Marshal MsgData", err) - continue - } - if err := mc.msgDatabase.RevokeMsg(ctx, tips.ConversationID, tips.Seq, data); err != nil { - log.ZError(ctx, "RevokeMsg", err, "conversationID", tips.ConversationID, "seq", tips.Seq) - continue - } + //case constant.MsgRevokeNotification: + // var elem sdkws.NotificationElem + // if err := json.Unmarshal(v.Content, &elem); err != nil { + // log.ZError(ctx, "json.Unmarshal NotificationElem", err, "content", string(v.Content)) + // continue + // } + // var tips sdkws.RevokeMsgTips + // if err := json.Unmarshal([]byte(elem.Detail), &tips); err != nil { + // log.ZError(ctx, "json.Unmarshal RevokeMsgTips", err, "content", string(v.Content)) + // continue + // } + // msgs, err := mc.msgDatabase.GetMsgBySeqs(ctx, tips.ConversationID, []int64{tips.Seq}) + // if err != nil { + // log.ZError(ctx, "GetMsgBySeqs", err, "conversationID", tips.ConversationID, "seq", tips.Seq) + // continue + // } + // if len(msgs) == 0 { + // log.ZError(ctx, "GetMsgBySeqs empty", errors.New("seq not found"), "conversationID", tips.ConversationID, "seq", tips.Seq) + // continue + // } + // msgs[0].Content = []byte(elem.Detail) + // data, err := proto.Marshal(msgs[0]) + // if err != nil { + // log.ZError(ctx, "proto.Marshal MsgData", err) + // continue + // } + // if err := mc.msgDatabase.RevokeMsg(ctx, tips.ConversationID, tips.Seq, data); err != nil { + // log.ZError(ctx, "RevokeMsg", err, "conversationID", tips.ConversationID, "seq", tips.Seq) + // continue + // } } } } diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 4569c795d..f917763d4 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -1217,23 +1217,32 @@ func (s *groupServer) SetGroupMemberInfo(ctx context.Context, req *pbGroup.SetGr return nil, errs.ErrArgs.Wrap("invalid role level") } } + opMember, ok := memberMap[[...]string{member.GroupID, opUserID}] + if !ok { + return nil, errs.ErrArgs.Wrap(fmt.Sprintf("user %s not in group %s", opUserID, member.GroupID)) + } if member.UserID == opUserID { if member.RoleLevel != nil { return nil, errs.ErrNoPermission.Wrap("can not change self role level") } continue } - opMember, ok := memberMap[[...]string{member.GroupID, opUserID}] - if !ok { - return nil, errs.ErrArgs.Wrap(fmt.Sprintf("user %s not in group %s", opUserID, member.GroupID)) + if opMember.RoleLevel == constant.GroupOrdinaryUsers { + return nil, errs.ErrNoPermission.Wrap("ordinary users can not change other role level") } dbMember, ok := memberMap[[...]string{member.GroupID, member.UserID}] if !ok { return nil, errs.ErrRecordNotFound.Wrap(fmt.Sprintf("user %s not in group %s", member.UserID, member.GroupID)) } - if opMember.RoleLevel == constant.GroupOrdinaryUsers { - return nil, errs.ErrNoPermission.Wrap("ordinary users can not change other role level") - } + //if opMember.RoleLevel == constant.GroupOwner { + // continue + //} + //if dbMember.RoleLevel == constant.GroupOwner { + // return nil, errs.ErrNoPermission.Wrap("change group owner") + //} + //if opMember.RoleLevel == constant.GroupAdmin && dbMember.RoleLevel == constant.GroupAdmin { + // return nil, errs.ErrNoPermission.Wrap("admin can not change other admin role info") + //} switch opMember.RoleLevel { case constant.GroupOrdinaryUsers: return nil, errs.ErrNoPermission.Wrap("ordinary users can not change other role level") @@ -1241,6 +1250,9 @@ func (s *groupServer) SetGroupMemberInfo(ctx context.Context, req *pbGroup.SetGr if dbMember.RoleLevel != constant.GroupOrdinaryUsers { return nil, errs.ErrNoPermission.Wrap("admin can not change other role level") } + if member.RoleLevel != nil { + return nil, errs.ErrNoPermission.Wrap("admin can not change other role level") + } case constant.GroupOwner: //if member.RoleLevel != nil && member.RoleLevel.Value == constant.GroupOwner { // return nil, errs.ErrNoPermission.Wrap("owner only one") diff --git a/internal/rpc/msg/callback.go b/internal/rpc/msg/callback.go index 4d6d70e03..5bf3b4035 100644 --- a/internal/rpc/msg/callback.go +++ b/internal/rpc/msg/callback.go @@ -38,7 +38,7 @@ func toCommonCallback(ctx context.Context, msg *pbChat.SendMsgReq, command strin } } -func CallbackBeforeSendSingleMsg(ctx context.Context, msg *pbChat.SendMsgReq) error { +func callbackBeforeSendSingleMsg(ctx context.Context, msg *pbChat.SendMsgReq) error { if !config.Config.Callback.CallbackBeforeSendSingleMsg.Enable { return nil } @@ -50,7 +50,7 @@ func CallbackBeforeSendSingleMsg(ctx context.Context, msg *pbChat.SendMsgReq) er return http.CallBackPostReturn(cbURL(), req, resp, config.Config.Callback.CallbackBeforeSendSingleMsg) } -func CallbackAfterSendSingleMsg(ctx context.Context, msg *pbChat.SendMsgReq) error { +func callbackAfterSendSingleMsg(ctx context.Context, msg *pbChat.SendMsgReq) error { if !config.Config.Callback.CallbackAfterSendSingleMsg.Enable { return nil } @@ -62,7 +62,7 @@ func CallbackAfterSendSingleMsg(ctx context.Context, msg *pbChat.SendMsgReq) err return http.CallBackPostReturn(cbURL(), req, resp, config.Config.Callback.CallbackAfterSendSingleMsg) } -func CallbackBeforeSendGroupMsg(ctx context.Context, msg *pbChat.SendMsgReq) error { +func callbackBeforeSendGroupMsg(ctx context.Context, msg *pbChat.SendMsgReq) error { if !config.Config.Callback.CallbackAfterSendSingleMsg.Enable { return nil } @@ -74,7 +74,7 @@ func CallbackBeforeSendGroupMsg(ctx context.Context, msg *pbChat.SendMsgReq) err return http.CallBackPostReturn(cbURL(), req, resp, config.Config.Callback.CallbackAfterSendSingleMsg) } -func CallbackAfterSendGroupMsg(ctx context.Context, msg *pbChat.SendMsgReq) error { +func callbackAfterSendGroupMsg(ctx context.Context, msg *pbChat.SendMsgReq) error { if !config.Config.Callback.CallbackAfterSendGroupMsg.Enable { return nil } @@ -86,7 +86,7 @@ func CallbackAfterSendGroupMsg(ctx context.Context, msg *pbChat.SendMsgReq) erro return http.CallBackPostReturn(cbURL(), req, resp, config.Config.Callback.CallbackAfterSendGroupMsg) } -func CallbackMsgModify(ctx context.Context, msg *pbChat.SendMsgReq) error { +func callbackMsgModify(ctx context.Context, msg *pbChat.SendMsgReq) error { if !config.Config.Callback.CallbackMsgModify.Enable || msg.MsgData.ContentType != constant.Text { return nil } diff --git a/internal/rpc/msg/delete.go b/internal/rpc/msg/delete.go index 68fe9fc7c..084320583 100644 --- a/internal/rpc/msg/delete.go +++ b/internal/rpc/msg/delete.go @@ -3,30 +3,34 @@ package msg import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/tokenverify" "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" ) -func (m *msgServer) DelMsgs(ctx context.Context, req *msg.DelMsgsReq) (*msg.DelMsgsResp, error) { - // if _, err := m.MsgDatabase.DelMsgBySeqs(ctx, req.UserID, req.Seqs); err != nil { - // return nil, err - // } - return &msg.DelMsgsResp{}, nil +func (m *msgServer) getMinSeqs(maxSeqs map[string]int64) map[string]int64 { + minSeqs := make(map[string]int64) + for k, v := range maxSeqs { + minSeqs[k] = v + 1 + } + return minSeqs } -func (m *msgServer) DelSuperGroupMsg(ctx context.Context, req *msg.DelSuperGroupMsgReq) (*msg.DelSuperGroupMsgResp, error) { - resp := &msg.DelSuperGroupMsgResp{} - if err := tokenverify.CheckAdmin(ctx); err != nil { +func (m *msgServer) ClearConversationsMsg(ctx context.Context, req *msg.ClearConversationsMsgReq) (*msg.ClearConversationsMsgResp, error) { + if err := tokenverify.CheckAccessV3(ctx, req.UserID); err != nil { + return nil, err + } + maxSeqs, err := m.MsgDatabase.GetMaxSeqs(ctx, req.ConversationIDs) + if err != nil { return nil, err } - if err := m.MsgDatabase.DeleteConversationMsgsAndSetMinSeq(ctx, req.GroupID, 0); err != nil { + if err := m.MsgDatabase.SetUserConversationsMinSeqs(ctx, req.UserID, m.getMinSeqs(maxSeqs)); err != nil { return nil, err } - return resp, nil + return &msg.ClearConversationsMsgResp{}, nil } -func (m *msgServer) ClearMsg(ctx context.Context, req *msg.ClearMsgReq) (*msg.ClearMsgResp, error) { - resp := &msg.ClearMsgResp{} +func (m *msgServer) UserClearAllMsg(ctx context.Context, req *msg.UserClearAllMsgReq) (*msg.UserClearAllMsgResp, error) { if err := tokenverify.CheckAccessV3(ctx, req.UserID); err != nil { return nil, err } @@ -34,6 +38,32 @@ func (m *msgServer) ClearMsg(ctx context.Context, req *msg.ClearMsgReq) (*msg.Cl if err != nil { return nil, err } - m.MsgDatabase.CleanUpUserConversationsMsgs(ctx, req.UserID, conversationIDs) - return resp, nil + maxSeqs, err := m.MsgDatabase.GetMaxSeqs(ctx, conversationIDs) + if err != nil { + return nil, err + } + if err := m.MsgDatabase.SetUserConversationsMinSeqs(ctx, req.UserID, m.getMinSeqs(maxSeqs)); err != nil { + return nil, err + } + return &msg.UserClearAllMsgResp{}, nil +} + +func (m *msgServer) DeleteMsgs(ctx context.Context, req *msg.DeleteMsgsReq) (*msg.DeleteMsgsResp, error) { + if err := tokenverify.CheckAccessV3(ctx, req.UserID); err != nil { + return nil, err + } + return &msg.DeleteMsgsResp{}, nil +} + +func (m *msgServer) DeleteMsgPhysicalBySeq(ctx context.Context, req *msg.DeleteMsgPhysicalBySeqReq) (*msg.DeleteMsgPhysicalBySeqResp, error) { + return &msg.DeleteMsgPhysicalBySeqResp{}, nil +} + +func (m *msgServer) DeleteMsgPhysical(ctx context.Context, req *msg.DeleteMsgPhysicalReq) (*msg.DeleteMsgPhysicalResp, error) { + for _, conversationID := range req.ConversationIDs { + if err := m.MsgDatabase.DeleteConversationMsgsAndSetMinSeq(ctx, conversationID, req.RemainTime); err != nil { + log.ZWarn(ctx, "DeleteConversationMsgsAndSetMinSeq error", err, "conversationID", conversationID, "err", err) + } + } + return &msg.DeleteMsgPhysicalResp{}, nil } diff --git a/internal/rpc/msg/extend_msg_callback.go b/internal/rpc/msg/extend_msg_callback.go index 9f88e4999..ca17c69e1 100644 --- a/internal/rpc/msg/extend_msg_callback.go +++ b/internal/rpc/msg/extend_msg_callback.go @@ -11,7 +11,7 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" ) -func CallbackSetMessageReactionExtensions(ctx context.Context, setReq *msg.SetMessageReactionExtensionsReq) error { +func callbackSetMessageReactionExtensions(ctx context.Context, setReq *msg.SetMessageReactionExtensionsReq) error { if !config.Config.Callback.CallbackAfterSendGroupMsg.Enable { return nil } @@ -35,7 +35,7 @@ func CallbackSetMessageReactionExtensions(ctx context.Context, setReq *msg.SetMe return nil } -func CallbackDeleteMessageReactionExtensions(setReq *msg.DeleteMessagesReactionExtensionsReq) error { +func callbackDeleteMessageReactionExtensions(setReq *msg.DeleteMessagesReactionExtensionsReq) error { if !config.Config.Callback.CallbackAfterSendGroupMsg.Enable { return nil } @@ -54,7 +54,7 @@ func CallbackDeleteMessageReactionExtensions(setReq *msg.DeleteMessagesReactionE return http.CallBackPostReturn(cbURL(), req, resp, config.Config.Callback.CallbackAfterSendGroupMsg) } -func CallbackGetMessageListReactionExtensions(ctx context.Context, getReq *msg.GetMessagesReactionExtensionsReq) error { +func callbackGetMessageListReactionExtensions(ctx context.Context, getReq *msg.GetMessagesReactionExtensionsReq) error { if !config.Config.Callback.CallbackAfterSendGroupMsg.Enable { return nil } @@ -70,7 +70,7 @@ func CallbackGetMessageListReactionExtensions(ctx context.Context, getReq *msg.G return http.CallBackPostReturn(cbURL(), req, resp, config.Config.Callback.CallbackAfterSendGroupMsg) } -func CallbackAddMessageReactionExtensions(ctx context.Context, setReq *msg.ModifyMessageReactionExtensionsReq) error { +func callbackAddMessageReactionExtensions(ctx context.Context, setReq *msg.ModifyMessageReactionExtensionsReq) error { req := &cbapi.CallbackAddMessageReactionExtReq{ OperationID: mcontext.GetOperationID(ctx), CallbackCommand: constant.CallbackAddMessageListReactionExtensionsCommand, diff --git a/internal/rpc/msg/message_interceptor.go b/internal/rpc/msg/message_interceptor.go index e07db2ec8..9d4314dff 100644 --- a/internal/rpc/msg/message_interceptor.go +++ b/internal/rpc/msg/message_interceptor.go @@ -2,6 +2,7 @@ package msg import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" @@ -30,7 +31,7 @@ func MessageHasReadEnabled(_ context.Context, req *msg.SendMsgReq) (*sdkws.MsgDa return req.MsgData, nil } func MessageModifyCallback(ctx context.Context, req *msg.SendMsgReq) (*sdkws.MsgData, error) { - if err := CallbackMsgModify(ctx, req); err != nil && err != errs.ErrCallbackContinue { + if err := callbackMsgModify(ctx, req); err != nil && err != errs.ErrCallbackContinue { log.ZWarn(ctx, "CallbackMsgModify failed", err, "req", req.String()) return nil, err } @@ -39,18 +40,13 @@ func MessageModifyCallback(ctx context.Context, req *msg.SendMsgReq) (*sdkws.Msg func MessageBeforeSendCallback(ctx context.Context, req *msg.SendMsgReq) (*sdkws.MsgData, error) { switch req.MsgData.SessionType { case constant.SingleChatType: - if err := CallbackBeforeSendSingleMsg(ctx, req); err != nil && err != errs.ErrCallbackContinue { + if err := callbackBeforeSendSingleMsg(ctx, req); err != nil && err != errs.ErrCallbackContinue { log.ZWarn(ctx, "CallbackBeforeSendSingleMsg failed", err, "req", req.String()) return nil, err } - case constant.GroupChatType: - if err := CallbackBeforeSendGroupMsg(ctx, req); err != nil && err != errs.ErrCallbackContinue { - log.ZWarn(ctx, "CallbackBeforeSendGroupMsg failed", err, "req", req.String()) - return nil, err - } case constant.NotificationChatType: case constant.SuperGroupChatType: - if err := CallbackBeforeSendGroupMsg(ctx, req); err != nil && err != errs.ErrCallbackContinue { + if err := callbackBeforeSendGroupMsg(ctx, req); err != nil && err != errs.ErrCallbackContinue { log.ZWarn(ctx, "CallbackBeforeSendGroupMsg failed", err, "req", req.String()) return nil, err } diff --git a/internal/rpc/msg/revoke.go b/internal/rpc/msg/revoke.go index f0a510212..6d9064f05 100644 --- a/internal/rpc/msg/revoke.go +++ b/internal/rpc/msg/revoke.go @@ -5,11 +5,13 @@ import ( "encoding/json" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" + unRelationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/tokenverify" "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" + "time" ) func (m *msgServer) RevokeMsg(ctx context.Context, req *msg.RevokeMsgReq) (*msg.RevokeMsgResp, error) { @@ -22,9 +24,16 @@ func (m *msgServer) RevokeMsg(ctx context.Context, req *msg.RevokeMsgReq) (*msg. if req.RecvID != "" && req.GroupID != "" { return nil, errs.ErrArgs.Wrap("recv_id and group_id cannot exist at the same time") } + if req.Seq < 0 { + return nil, errs.ErrArgs.Wrap("seq is invalid") + } if err := tokenverify.CheckAccessV3(ctx, req.RecvID); err != nil { return nil, err } + user, err := m.User.GetUserInfo(ctx, req.UserID) + if err != nil { + return nil, err + } var sessionType int32 var conversationID string if req.GroupID == "" { @@ -34,6 +43,46 @@ func (m *msgServer) RevokeMsg(ctx context.Context, req *msg.RevokeMsgReq) (*msg. sessionType = constant.SuperGroupChatType conversationID = utils.GenConversationUniqueKeyForGroup(req.GroupID) } + msgs, err := m.MsgDatabase.GetMsgBySeqs(ctx, conversationID, []int64{req.Seq}) + if err != nil { + return nil, err + } + if len(msgs) == 0 { + return nil, errs.ErrRecordNotFound.Wrap("msg not found") + } + sendID := msgs[0].SendID + if !tokenverify.IsAppManagerUid(ctx) { + if req.GroupID == "" { + if req.UserID != sendID { + return nil, errs.ErrNoPermission.Wrap("no permission") + } + } else { + members, err := m.Group.GetGroupMemberInfoMap(ctx, req.GroupID, utils.Distinct([]string{req.UserID, sendID}), true) + if err != nil { + return nil, err + } + if req.UserID != sendID { + roleLevel := members[req.UserID].RoleLevel + switch members[req.UserID].RoleLevel { + case constant.GroupOwner: + case constant.GroupAdmin: + if roleLevel != constant.GroupOrdinaryUsers { + return nil, errs.ErrNoPermission.Wrap("no permission") + } + default: + return nil, errs.ErrNoPermission.Wrap("no permission") + } + } + } + } + err = m.MsgDatabase.RevokeMsg(ctx, conversationID, req.Seq, &unRelationTb.RevokeModel{ + UserID: req.UserID, + Nickname: user.Nickname, + Time: time.Now().UnixMilli(), + }) + if err != nil { + return nil, err + } tips := sdkws.RevokeMsgTips{ RevokerUserID: req.UserID, ClientMsgID: "", diff --git a/internal/rpc/msg/send_pull.go b/internal/rpc/msg/send.go similarity index 78% rename from internal/rpc/msg/send_pull.go rename to internal/rpc/msg/send.go index ee8d60243..885487896 100644 --- a/internal/rpc/msg/send_pull.go +++ b/internal/rpc/msg/send.go @@ -12,6 +12,28 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" ) +func (m *msgServer) SendMsg(ctx context.Context, req *msg.SendMsgReq) (resp *msg.SendMsgResp, error error) { + resp = &msg.SendMsgResp{} + flag := isMessageHasReadEnabled(req.MsgData) + if !flag { + return nil, errs.ErrMessageHasReadDisable.Wrap() + } + m.encapsulateMsgData(req.MsgData) + if err := callbackMsgModify(ctx, req); err != nil && err != errs.ErrCallbackContinue { + return nil, err + } + switch req.MsgData.SessionType { + case constant.SingleChatType: + return m.sendMsgSingleChat(ctx, req) + case constant.NotificationChatType: + return m.sendMsgNotification(ctx, req) + case constant.SuperGroupChatType: + return m.sendMsgSuperGroupChat(ctx, req) + default: + return nil, errs.ErrArgs.Wrap("unknown sessionType") + } +} + func (m *msgServer) sendMsgSuperGroupChat(ctx context.Context, req *pbMsg.SendMsgReq) (resp *pbMsg.SendMsgResp, err error) { resp = &pbMsg.SendMsgResp{} promePkg.Inc(promePkg.WorkSuperGroupChatMsgRecvSuccessCounter) @@ -23,7 +45,7 @@ func (m *msgServer) sendMsgSuperGroupChat(ctx context.Context, req *pbMsg.SendMs if err != nil { return nil, err } - if err = CallbackAfterSendGroupMsg(ctx, req); err != nil { + if err = callbackAfterSendGroupMsg(ctx, req); err != nil { log.ZError(ctx, "CallbackAfterSendGroupMsg", err) } promePkg.Inc(promePkg.WorkSuperGroupChatMsgProcessSuccessCounter) @@ -69,7 +91,7 @@ func (m *msgServer) sendMsgSingleChat(ctx context.Context, req *pbMsg.SendMsgReq promePkg.Inc(promePkg.SingleChatMsgProcessFailedCounter) return nil, err } - err = CallbackAfterSendSingleMsg(ctx, req) + err = callbackAfterSendSingleMsg(ctx, req) if err != nil && err != errs.ErrCallbackContinue { return nil, err } diff --git a/internal/rpc/msg/server.go b/internal/rpc/msg/server.go index f9288d312..15392ada2 100644 --- a/internal/rpc/msg/server.go +++ b/internal/rpc/msg/server.go @@ -3,21 +3,15 @@ package msg import ( "context" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/cache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/localcache" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/tx" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/unrelation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/prome" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/tokenverify" "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry" - "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" "github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient" - "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" "google.golang.org/grpc" ) @@ -102,75 +96,3 @@ func (m *msgServer) initPrometheus() { prome.NewWorkSuperGroupChatMsgProcessSuccessCounter() prome.NewWorkSuperGroupChatMsgProcessFailedCounter() } - -func (m *msgServer) SendMsg(ctx context.Context, req *msg.SendMsgReq) (resp *msg.SendMsgResp, error error) { - resp = &msg.SendMsgResp{} - flag := isMessageHasReadEnabled(req.MsgData) - if !flag { - return nil, errs.ErrMessageHasReadDisable.Wrap() - } - m.encapsulateMsgData(req.MsgData) - if err := CallbackMsgModify(ctx, req); err != nil && err != errs.ErrCallbackContinue { - return nil, err - } - switch req.MsgData.SessionType { - case constant.SingleChatType: - return m.sendMsgSingleChat(ctx, req) - case constant.NotificationChatType: - return m.sendMsgNotification(ctx, req) - case constant.SuperGroupChatType: - return m.sendMsgSuperGroupChat(ctx, req) - default: - return nil, errs.ErrArgs.Wrap("unknown sessionType") - } -} - -func (m *msgServer) GetMaxSeq(ctx context.Context, req *sdkws.GetMaxSeqReq) (*sdkws.GetMaxSeqResp, error) { - if err := tokenverify.CheckAccessV3(ctx, req.UserID); err != nil { - return nil, err - } - conversationIDs, err := m.ConversationLocalCache.GetConversationIDs(ctx, req.UserID) - if err != nil { - return nil, err - } - for _, conversationID := range conversationIDs { - conversationIDs = append(conversationIDs, utils.GetNotificationConversationIDByConversationID(conversationID)) - } - log.ZDebug(ctx, "GetMaxSeq", "conversationIDs", conversationIDs) - maxSeqs, err := m.MsgDatabase.GetMaxSeqs(ctx, conversationIDs) - if err != nil { - log.ZWarn(ctx, "GetMaxSeqs error", err, "conversationIDs", conversationIDs, "maxSeqs", maxSeqs) - return nil, err - } - resp := new(sdkws.GetMaxSeqResp) - resp.MaxSeqs = maxSeqs - return resp, nil -} - -func (m *msgServer) PullMessageBySeqs(ctx context.Context, req *sdkws.PullMessageBySeqsReq) (*sdkws.PullMessageBySeqsResp, error) { - resp := &sdkws.PullMessageBySeqsResp{} - resp.Msgs = make(map[string]*sdkws.PullMsgs) - resp.NotificationMsgs = make(map[string]*sdkws.PullMsgs) - for _, seq := range req.SeqRanges { - if !utils.IsNotification(seq.ConversationID) { - msgs, err := m.MsgDatabase.GetMsgBySeqsRange(ctx, seq.ConversationID, seq.Begin, seq.End, seq.Num) - if err != nil { - log.ZWarn(ctx, "GetMsgBySeqsRange error", err, "conversationID", seq.ConversationID, "seq", seq) - continue - } - resp.Msgs[seq.ConversationID] = &sdkws.PullMsgs{Msgs: msgs} - } else { - var seqs []int64 - for i := seq.Begin; i <= seq.End; i++ { - seqs = append(seqs, i) - } - notificationMsgs, err := m.MsgDatabase.GetMsgBySeqs(ctx, seq.ConversationID, seqs) - if err != nil { - log.ZWarn(ctx, "GetMsgBySeqs error", err, "conversationID", seq.ConversationID, "seq", seq) - continue - } - resp.NotificationMsgs[seq.ConversationID] = &sdkws.PullMsgs{Msgs: notificationMsgs} - } - } - return resp, nil -} diff --git a/internal/rpc/msg/sync_msg.go b/internal/rpc/msg/sync_msg.go new file mode 100644 index 000000000..da010b0f5 --- /dev/null +++ b/internal/rpc/msg/sync_msg.go @@ -0,0 +1,60 @@ +package msg + +import ( + "context" + + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/tokenverify" + "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" + "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" +) + +func (m *msgServer) PullMessageBySeqs(ctx context.Context, req *sdkws.PullMessageBySeqsReq) (*sdkws.PullMessageBySeqsResp, error) { + resp := &sdkws.PullMessageBySeqsResp{} + resp.Msgs = make(map[string]*sdkws.PullMsgs) + resp.NotificationMsgs = make(map[string]*sdkws.PullMsgs) + for _, seq := range req.SeqRanges { + if !utils.IsNotification(seq.ConversationID) { + msgs, err := m.MsgDatabase.GetMsgBySeqsRange(ctx, seq.ConversationID, seq.Begin, seq.End, seq.Num) + if err != nil { + log.ZWarn(ctx, "GetMsgBySeqsRange error", err, "conversationID", seq.ConversationID, "seq", seq) + continue + } + resp.Msgs[seq.ConversationID] = &sdkws.PullMsgs{Msgs: msgs} + } else { + var seqs []int64 + for i := seq.Begin; i <= seq.End; i++ { + seqs = append(seqs, i) + } + notificationMsgs, err := m.MsgDatabase.GetMsgBySeqs(ctx, seq.ConversationID, seqs) + if err != nil { + log.ZWarn(ctx, "GetMsgBySeqs error", err, "conversationID", seq.ConversationID, "seq", seq) + continue + } + resp.NotificationMsgs[seq.ConversationID] = &sdkws.PullMsgs{Msgs: notificationMsgs} + } + } + return resp, nil +} + +func (m *msgServer) GetMaxSeq(ctx context.Context, req *sdkws.GetMaxSeqReq) (*sdkws.GetMaxSeqResp, error) { + if err := tokenverify.CheckAccessV3(ctx, req.UserID); err != nil { + return nil, err + } + conversationIDs, err := m.ConversationLocalCache.GetConversationIDs(ctx, req.UserID) + if err != nil { + return nil, err + } + for _, conversationID := range conversationIDs { + conversationIDs = append(conversationIDs, utils.GetNotificationConversationIDByConversationID(conversationID)) + } + log.ZDebug(ctx, "GetMaxSeq", "conversationIDs", conversationIDs) + maxSeqs, err := m.MsgDatabase.GetMaxSeqs(ctx, conversationIDs) + if err != nil { + log.ZWarn(ctx, "GetMaxSeqs error", err, "conversationIDs", conversationIDs, "maxSeqs", maxSeqs) + return nil, err + } + resp := new(sdkws.GetMaxSeqResp) + resp.MaxSeqs = maxSeqs + return resp, nil +} diff --git a/internal/rpc/msg/send_msg.go b/internal/rpc/msg/verify.go similarity index 95% rename from internal/rpc/msg/send_msg.go rename to internal/rpc/msg/verify.go index 7f963b537..446363354 100644 --- a/internal/rpc/msg/send_msg.go +++ b/internal/rpc/msg/verify.go @@ -292,20 +292,3 @@ func (m *msgServer) modifyMessageByUserMessageReceiveOpt(ctx context.Context, us } return true, nil } - -func valueCopy(pb *msg.SendMsgReq) *msg.SendMsgReq { - offlinePushInfo := sdkws.OfflinePushInfo{} - if pb.MsgData.OfflinePushInfo != nil { - offlinePushInfo = *pb.MsgData.OfflinePushInfo - } - msgData := sdkws.MsgData{} - msgData = *pb.MsgData - msgData.OfflinePushInfo = &offlinePushInfo - - options := make(map[string]bool, 10) - for key, value := range pb.MsgData.Options { - options[key] = value - } - msgData.Options = options - return &msg.SendMsgReq{MsgData: &msgData} -} diff --git a/pkg/common/db/cache/msg.go b/pkg/common/db/cache/msg.go index 6d56dba4a..4f5afd05e 100644 --- a/pkg/common/db/cache/msg.go +++ b/pkg/common/db/cache/msg.go @@ -52,7 +52,10 @@ type MsgModel interface { GetConversationUserMinSeq(ctx context.Context, conversationID string, userID string) (int64, error) GetConversationUserMinSeqs(ctx context.Context, conversationID string, userIDs []string) (map[string]int64, error) SetConversationUserMinSeq(ctx context.Context, conversationID string, userID string, minSeq int64) error + // seqs map: key userID value minSeq SetConversationUserMinSeqs(ctx context.Context, conversationID string, seqs map[string]int64) (err error) + // seqs map: key conversationID value minSeq + SetUserConversationsMinSeqs(ctx context.Context, userID string, seqs map[string]int64) error AddTokenFlag(ctx context.Context, userID string, platformID int, token string, flag int) error GetTokensWithoutError(ctx context.Context, userID, platformID string) (map[string]int, error) @@ -195,6 +198,18 @@ func (c *msgCache) SetConversationUserMinSeqs(ctx context.Context, conversationI return err } +func (c *msgCache) SetUserConversationsMinSeqs(ctx context.Context, userID string, seqs map[string]int64) (err error) { + pipe := c.rdb.Pipeline() + for conversationID, minSeq := range seqs { + err = pipe.Set(ctx, c.getConversationUserMinSeqKey(conversationID, userID), minSeq, 0).Err() + if err != nil { + return errs.Wrap(err) + } + } + _, err = pipe.Exec(ctx) + return err +} + func (c *msgCache) AddTokenFlag(ctx context.Context, userID string, platformID int, token string, flag int) error { key := uidPidToken + userID + ":" + constant.PlatformIDToName(platformID) return errs.Wrap(c.rdb.HSet(ctx, key, token, flag).Err()) diff --git a/pkg/common/db/controller/msg.go b/pkg/common/db/controller/msg.go index 62abb2bc7..ee8c8cbf1 100644 --- a/pkg/common/db/controller/msg.go +++ b/pkg/common/db/controller/msg.go @@ -3,6 +3,7 @@ package controller import ( "fmt" "sort" + "strconv" "sync" "time" @@ -25,15 +26,13 @@ import ( "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" "github.com/go-redis/redis/v8" "go.mongodb.org/mongo-driver/mongo" - - "google.golang.org/protobuf/proto" ) type CommonMsgDatabase interface { // 批量插入消息 BatchInsertChat2DB(ctx context.Context, conversationID string, msgs []*sdkws.MsgData, currentMaxSeq int64) error // 撤回消息 - RevokeMsg(ctx context.Context, conversationID string, seq int64, msg []byte) error + RevokeMsg(ctx context.Context, conversationID string, seq int64, revoke *unRelationTb.RevokeModel) error // 刪除redis中消息缓存 DeleteMessageFromCache(ctx context.Context, conversationID string, msgs []*sdkws.MsgData) error // incrSeq然后批量插入缓存 @@ -57,6 +56,7 @@ type CommonMsgDatabase interface { GetConversationUserMinSeqs(ctx context.Context, conversationID string, userIDs []string) (map[string]int64, error) SetConversationUserMinSeq(ctx context.Context, conversationID string, userID string, minSeq int64) error SetConversationUserMinSeqs(ctx context.Context, conversationID string, seqs map[string]int64) (err error) + SetUserConversationsMinSeqs(ctx context.Context, userID string, seqs map[string]int64) (err error) GetMongoMaxAndMinSeq(ctx context.Context, conversationID string) (maxSeq, minSeq int64, err error) GetConversationMinMaxSeqInMongoAndCache(ctx context.Context, conversationID string) (minSeqMongo, maxSeqMongo, minSeqCache, maxSeqCache int64, err error) @@ -141,99 +141,192 @@ func (db *commonMsgDatabase) MsgToMongoMQ(ctx context.Context, key, conversation return nil } -func (db *commonMsgDatabase) BatchInsertChat2DB(ctx context.Context, conversationID string, msgList []*sdkws.MsgData, currentMaxSeq int64) error { +func (db *commonMsgDatabase) BatchInsertBlock(ctx context.Context, conversationID string, msgList []*unRelationTb.MsgInfoModel, firstSeq int64) error { + if len(msgList) == 0 { + return nil + } num := db.msg.GetSingleGocMsgNum() - currentIndex := currentMaxSeq / num - var blockMsgs []*[]*sdkws.MsgData - for i, data := range msgList { - data.Seq = currentMaxSeq + int64(i+1) - index := data.Seq/num - currentIndex - if i == 0 && index == 1 { - index-- - currentIndex++ - } - var block *[]*sdkws.MsgData - if len(blockMsgs) == int(index) { - var size int64 - if i == 0 { - size = num - data.Seq%num - } else { - temp := int64(len(msgList)-len(*blockMsgs[0])) - int64(len(blockMsgs)-1)*num - if temp >= num { - size = num - } else { - size = temp % num - } - } - temp := make([]*sdkws.MsgData, 0, size) - block = &temp - blockMsgs = append(blockMsgs, block) + //num = 100 + if msgList[0].Msg != nil { + firstSeq = msgList[0].Msg.Seq + } + getDocID := func(seq int64) string { + return conversationID + ":" + strconv.FormatInt(seq/num, 10) + } + getIndex := func(seq int64) int64 { + return seq % num + } + // 返回值为true表示数据库存在该文档,false表示数据库不存在该文档 + updateMsgModel := func(docID string, index int64, msg *unRelationTb.MsgInfoModel) (bool, error) { + var ( + res *mongo.UpdateResult + err error + ) + if msg.Msg != nil { + res, err = db.msgDocDatabase.UpdateMsg(ctx, docID, index, "msg", msg.Msg) + } else if msg.Revoke != nil { + res, err = db.msgDocDatabase.UpdateMsg(ctx, docID, index, "revoke", msg.Revoke) + } else if msg.DelList != nil { + res, err = db.msgDocDatabase.PushUnique(ctx, docID, index, "del_list", msg.DelList) + } else if msg.ReadList != nil { + res, err = db.msgDocDatabase.PushUnique(ctx, docID, index, "read_list", msg.ReadList) } else { - block = blockMsgs[index] + return false, errs.ErrArgs.Wrap("msg all field is nil") } - *block = append(*block, msgList[i]) - } - create := currentMaxSeq == 0 || ((*blockMsgs[0])[0].Seq%num == 0) - if !create { - exist, err := db.msgDocDatabase.IsExistDocID(ctx, db.msg.IndexDocID(conversationID, currentIndex)) if err != nil { - return err + return false, err } - create = !exist - } - for i, msgs := range blockMsgs { - docID := db.msg.IndexDocID(conversationID, currentIndex+int64(i)) - if create || i != 0 { // 插入 - doc := unRelationTb.MsgDocModel{ - DocID: docID, - Msg: make([]unRelationTb.MsgInfoModel, num), - } - for i := 0; i < len(doc.Msg); i++ { - doc.Msg[i].ReadList = []string{} - doc.Msg[i].DelList = []string{} + return res.MatchedCount > 0, nil + } + tryUpdate := true + for i := 0; i < len(msgList); i++ { + msg := msgList[i] + seq := firstSeq + int64(i) + docID := getDocID(seq) + if tryUpdate { + matched, err := updateMsgModel(docID, getIndex(seq), msg) + if err != nil { + return err } - for _, msg := range *msgs { - data, err := proto.Marshal(msg) - if err != nil { - return err - } - doc.Msg[msg.Seq%num] = unRelationTb.MsgInfoModel{ - SendTime: msg.SendTime, - Msg: data, - ReadList: []string{}, - DelList: []string{}, - } + if matched { + continue } - if err := db.msgDocDatabase.Create(ctx, &doc); err != nil { - prome.Inc(prome.MsgInsertMongoFailedCounter) - return utils.Wrap(err, "") + } + doc := unRelationTb.MsgDocModel{ + DocID: docID, + Msg: make([]*unRelationTb.MsgInfoModel, num), + } + var insert int + for j := i; j < len(msgList); j++ { + seq = firstSeq + int64(j) + if getDocID(seq) != docID { + break } - prome.Inc(prome.MsgInsertMongoSuccessCounter) - } else { // 修改 - for _, msg := range *msgs { - data, err := proto.Marshal(msg) - if err != nil { - return err + insert++ + doc.Msg[getIndex(seq)] = msgList[j] + } + for i, model := range doc.Msg { + if model == nil { + doc.Msg[i] = &unRelationTb.MsgInfoModel{ + DelList: []string{}, + ReadList: []string{}, } - info := unRelationTb.MsgInfoModel{ - SendTime: msg.SendTime, - Msg: data, + } else { + if model.DelList == nil { + doc.Msg[i].DelList = []string{} } - if err := db.msgDocDatabase.UpdateMsg(ctx, docID, msg.Seq%num, &info); err != nil { - prome.Inc(prome.MsgInsertMongoFailedCounter) - return err + if model.ReadList == nil { + doc.Msg[i].ReadList = []string{} } - prome.Inc(prome.MsgInsertMongoSuccessCounter) } } + if err := db.msgDocDatabase.Create(ctx, &doc); err != nil { + if mongo.IsDuplicateKeyError(err) { + i-- + tryUpdate = true + continue + } + return err + } + tryUpdate = false + i += insert - 1 } return nil } -func (db *commonMsgDatabase) RevokeMsg(ctx context.Context, conversationID string, seq int64, msg []byte) error { - index := seq / db.msg.GetSingleGocMsgNum() - docID := db.msg.IndexDocID(conversationID, index) - return db.msgDocDatabase.UpdateMsgContent(ctx, docID, seq%db.msg.GetSingleGocMsgNum(), msg) +func (db *commonMsgDatabase) BatchInsertChat2DB(ctx context.Context, conversationID string, msgList []*sdkws.MsgData, currentMaxSeq int64) error { + //num := db.msg.GetSingleGocMsgNum() + //currentIndex := currentMaxSeq / num + //var blockMsgs []*[]*sdkws.MsgData + //for i, data := range msgList { + // data.Seq = currentMaxSeq + int64(i+1) + // index := data.Seq/num - currentIndex + // if i == 0 && index == 1 { + // index-- + // currentIndex++ + // } + // var block *[]*sdkws.MsgData + // if len(blockMsgs) == int(index) { + // var size int64 + // if i == 0 { + // size = num - data.Seq%num + // } else { + // temp := int64(len(msgList)-len(*blockMsgs[0])) - int64(len(blockMsgs)-1)*num + // if temp >= num { + // size = num + // } else { + // size = temp % num + // } + // } + // temp := make([]*sdkws.MsgData, 0, size) + // block = &temp + // blockMsgs = append(blockMsgs, block) + // } else { + // block = blockMsgs[index] + // } + // *block = append(*block, msgList[i]) + //} + //create := currentMaxSeq == 0 || ((*blockMsgs[0])[0].Seq%num == 0) + //if !create { + // exist, err := db.msgDocDatabase.IsExistDocID(ctx, db.msg.IndexDocID(conversationID, currentIndex)) + // if err != nil { + // return err + // } + // create = !exist + //} + //for i, msgs := range blockMsgs { + // docID := db.msg.IndexDocID(conversationID, currentIndex+int64(i)) + // if create || i != 0 { // 插入 + // doc := unRelationTb.MsgDocModel{ + // DocID: docID, + // Msg: make([]unRelationTb.MsgInfoModel, num), + // } + // for i := 0; i < len(doc.Msg); i++ { + // doc.Msg[i].ReadList = []string{} + // doc.Msg[i].DelList = []string{} + // } + // for _, msg := range *msgs { + // data, err := proto.Marshal(msg) + // if err != nil { + // return err + // } + // doc.Msg[msg.Seq%num] = unRelationTb.MsgInfoModel{ + // SendTime: msg.SendTime, + // Msg: data, + // ReadList: []string{}, + // DelList: []string{}, + // } + // } + // if err := db.msgDocDatabase.Create(ctx, &doc); err != nil { + // prome.Inc(prome.MsgInsertMongoFailedCounter) + // return utils.Wrap(err, "") + // } + // prome.Inc(prome.MsgInsertMongoSuccessCounter) + // } else { // 修改 + // for _, msg := range *msgs { + // data, err := proto.Marshal(msg) + // if err != nil { + // return err + // } + // info := unRelationTb.MsgInfoModel{ + // SendTime: msg.SendTime, + // Msg: data, + // } + // if err := db.msgDocDatabase.UpdateMsg(ctx, docID, msg.Seq%num, &info); err != nil { + // prome.Inc(prome.MsgInsertMongoFailedCounter) + // return err + // } + // prome.Inc(prome.MsgInsertMongoSuccessCounter) + // } + // } + //} + return nil +} + +func (db *commonMsgDatabase) RevokeMsg(ctx context.Context, conversationID string, seq int64, revoke *unRelationTb.RevokeModel) error { + msgs := []*unRelationTb.MsgInfoModel{{Revoke: revoke}} + return db.BatchInsertBlock(ctx, conversationID, msgs, seq) + //return db.msgDocDatabase.UpdateMsgContent(ctx, docID, seq%db.msg.GetSingleGocMsgNum(), msg) } func (db *commonMsgDatabase) DeleteMessageFromCache(ctx context.Context, conversationID string, msgs []*sdkws.MsgData) error { @@ -330,10 +423,11 @@ func (db *commonMsgDatabase) GetOldestMsg(ctx context.Context, conversationID st func (db *commonMsgDatabase) unmarshalMsg(msgInfo *unRelationTb.MsgInfoModel) (msgPb *sdkws.MsgData, err error) { msgPb = &sdkws.MsgData{} - err = proto.Unmarshal(msgInfo.Msg, msgPb) - if err != nil { - return nil, utils.Wrap(err, "") - } + // todo: unmarshal + //err = proto.Unmarshal(msgInfo.Msg, msgPb) + //if err != nil { + // return nil, utils.Wrap(err, "") + //} return msgPb, nil } @@ -566,69 +660,70 @@ func (d *delMsgRecursionStruct) getSetMinSeq() int64 { // recursion 删除list并且返回设置的最小seq func (db *commonMsgDatabase) deleteMsgRecursion(ctx context.Context, conversationID string, index int64, delStruct *delMsgRecursionStruct, remainTime int64) (int64, error) { // find from oldest list - msgs, err := db.msgDocDatabase.GetMsgsByIndex(ctx, conversationID, index) - if err != nil || msgs.DocID == "" { - if err != nil { - if err == unrelation.ErrMsgListNotExist { - log.ZDebug(ctx, "deleteMsgRecursion ErrMsgListNotExist", "conversationID", conversationID, "index:", index) - } else { - log.ZError(ctx, "deleteMsgRecursion GetUserMsgListByIndex failed", err, "conversationID", conversationID, "index", index) - } - } - // 获取报错,或者获取不到了,物理删除并且返回seq delMongoMsgsPhysical(delStruct.delDocIDList), 结束递归 - err = db.msgDocDatabase.Delete(ctx, delStruct.delDocIDs) - if err != nil { - return 0, err - } - return delStruct.getSetMinSeq() + 1, nil - } - log.ZDebug(ctx, "doc info", "conversationID", conversationID, "index", index, "docID", msgs.DocID, "len", len(msgs.Msg)) - if int64(len(msgs.Msg)) > db.msg.GetSingleGocMsgNum() { - log.ZWarn(ctx, "msgs too large", nil, "lenth", len(msgs.Msg), "docID:", msgs.DocID) - } - if msgs.Msg[len(msgs.Msg)-1].SendTime+(remainTime*1000) < utils.GetCurrentTimestampByMill() && msgs.IsFull() { - delStruct.delDocIDs = append(delStruct.delDocIDs, msgs.DocID) - lastMsgPb := &sdkws.MsgData{} - err = proto.Unmarshal(msgs.Msg[len(msgs.Msg)-1].Msg, lastMsgPb) - if err != nil { - log.ZError(ctx, "proto.Unmarshal failed", err, "index", len(msgs.Msg)-1, "docID", msgs.DocID) - return 0, utils.Wrap(err, "proto.Unmarshal failed") - } - delStruct.minSeq = lastMsgPb.Seq - } else { - var hasMarkDelFlag bool - for i, msg := range msgs.Msg { - if msg.SendTime != 0 { - msgPb := &sdkws.MsgData{} - err = proto.Unmarshal(msg.Msg, msgPb) - if err != nil { - log.ZError(ctx, "proto.Unmarshal failed", err, "index", i, "docID", msgs.DocID) - return 0, utils.Wrap(err, "proto.Unmarshal failed") - } - if utils.GetCurrentTimestampByMill() > msg.SendTime+(remainTime*1000) { - msgPb.Status = constant.MsgDeleted - bytes, _ := proto.Marshal(msgPb) - msg.Msg = bytes - msg.SendTime = 0 - hasMarkDelFlag = true - } else { - // 到本条消息不需要删除, minSeq置为这条消息的seq - if err := db.msgDocDatabase.Delete(ctx, delStruct.delDocIDs); err != nil { - return 0, err - } - if hasMarkDelFlag { - if err := db.msgDocDatabase.UpdateOneDoc(ctx, msgs); err != nil { - return delStruct.getSetMinSeq(), err - } - } - return msgPb.Seq, nil - } - } - } - } - // 继续递归 index+1 - seq, err := db.deleteMsgRecursion(ctx, conversationID, index+1, delStruct, remainTime) - return seq, err + //msgs, err := db.msgDocDatabase.GetMsgsByIndex(ctx, conversationID, index) + //if err != nil || msgs.DocID == "" { + // if err != nil { + // if err == unrelation.ErrMsgListNotExist { + // log.ZDebug(ctx, "deleteMsgRecursion ErrMsgListNotExist", "conversationID", conversationID, "index:", index) + // } else { + // log.ZError(ctx, "deleteMsgRecursion GetUserMsgListByIndex failed", err, "conversationID", conversationID, "index", index) + // } + // } + // // 获取报错,或者获取不到了,物理删除并且返回seq delMongoMsgsPhysical(delStruct.delDocIDList), 结束递归 + // err = db.msgDocDatabase.Delete(ctx, delStruct.delDocIDs) + // if err != nil { + // return 0, err + // } + // return delStruct.getSetMinSeq() + 1, nil + //} + //log.ZDebug(ctx, "doc info", "conversationID", conversationID, "index", index, "docID", msgs.DocID, "len", len(msgs.Msg)) + //if int64(len(msgs.Msg)) > db.msg.GetSingleGocMsgNum() { + // log.ZWarn(ctx, "msgs too large", nil, "lenth", len(msgs.Msg), "docID:", msgs.DocID) + //} + //if msgs.Msg[len(msgs.Msg)-1].SendTime+(remainTime*1000) < utils.GetCurrentTimestampByMill() && msgs.IsFull() { + // delStruct.delDocIDs = append(delStruct.delDocIDs, msgs.DocID) + // lastMsgPb := &sdkws.MsgData{} + // err = proto.Unmarshal(msgs.Msg[len(msgs.Msg)-1].Msg, lastMsgPb) + // if err != nil { + // log.ZError(ctx, "proto.Unmarshal failed", err, "index", len(msgs.Msg)-1, "docID", msgs.DocID) + // return 0, utils.Wrap(err, "proto.Unmarshal failed") + // } + // delStruct.minSeq = lastMsgPb.Seq + //} else { + // var hasMarkDelFlag bool + // for i, msg := range msgs.Msg { + // if msg.SendTime != 0 { + // msgPb := &sdkws.MsgData{} + // err = proto.Unmarshal(msg.Msg, msgPb) + // if err != nil { + // log.ZError(ctx, "proto.Unmarshal failed", err, "index", i, "docID", msgs.DocID) + // return 0, utils.Wrap(err, "proto.Unmarshal failed") + // } + // if utils.GetCurrentTimestampByMill() > msg.SendTime+(remainTime*1000) { + // msgPb.Status = constant.MsgDeleted + // bytes, _ := proto.Marshal(msgPb) + // msg.Msg = bytes + // msg.SendTime = 0 + // hasMarkDelFlag = true + // } else { + // // 到本条消息不需要删除, minSeq置为这条消息的seq + // if err := db.msgDocDatabase.Delete(ctx, delStruct.delDocIDs); err != nil { + // return 0, err + // } + // if hasMarkDelFlag { + // if err := db.msgDocDatabase.UpdateOneDoc(ctx, msgs); err != nil { + // return delStruct.getSetMinSeq(), err + // } + // } + // return msgPb.Seq, nil + // } + // } + // } + //} + //// 继续递归 index+1 + //seq, err := db.deleteMsgRecursion(ctx, conversationID, index+1, delStruct, remainTime) + //return seq, err + return 0, nil } func (db *commonMsgDatabase) CleanUpUserConversationsMsgs(ctx context.Context, user string, conversationIDs []string) { @@ -679,6 +774,10 @@ func (db *commonMsgDatabase) SetConversationUserMinSeqs(ctx context.Context, con return db.cache.SetConversationUserMinSeqs(ctx, conversationID, seqs) } +func (db *commonMsgDatabase) SetUserConversationsMinSeqs(ctx context.Context, userID string, seqs map[string]int64) error { + return db.cache.SetUserConversationsMinSeqs(ctx, userID, seqs) +} + func (db *commonMsgDatabase) SetSendMsgStatus(ctx context.Context, id string, status int32) error { return db.cache.SetSendMsgStatus(ctx, id, status) } diff --git a/pkg/common/db/controller/msg_test.go b/pkg/common/db/controller/msg_test.go index d7cf3db86..6de3b4031 100644 --- a/pkg/common/db/controller/msg_test.go +++ b/pkg/common/db/controller/msg_test.go @@ -2,13 +2,12 @@ package controller import ( "context" - "encoding/json" "fmt" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/config" + unRelationTb "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/unrelation" "go.mongodb.org/mongo-driver/bson" "math/rand" - "sort" "strconv" "sync" "testing" @@ -38,6 +37,7 @@ func Test_BatchInsertChat2DB(t *testing.T) { db := &commonMsgDatabase{ msgDocDatabase: unrelation.NewMsgMongoDriver(mongo.GetDatabase()), } + //ctx := context.Background() //msgs := make([]*sdkws.MsgData, 0, 1) //for i := 0; i < cap(msgs); i++ { @@ -125,523 +125,110 @@ func Test_BatchInsertChat2DB(t *testing.T) { } -func TestName(t *testing.T) { - s := ` [ - 189, - 498, - 310, - 163, - 313, - 335, - 327, - 342, - 123, - 97, - 4, - 362, - 210, - 298, - 436, - 9, - 369, - 432, - 132, - 69, - 248, - 93, - 91, - 112, - 145, - 194, - 84, - 443, - 179, - 241, - 257, - 237, - 169, - 460, - 33, - 441, - 126, - 187, - 390, - 402, - 51, - 35, - 455, - 175, - 389, - 61, - 309, - 467, - 492, - 453, - 159, - 276, - 165, - 417, - 173, - 157, - 12, - 209, - 269, - 36, - 226, - 356, - 92, - 267, - 482, - 318, - 219, - 119, - 176, - 245, - 74, - 13, - 450, - 196, - 215, - 28, - 167, - 366, - 442, - 201, - 341, - 68, - 2, - 484, - 328, - 44, - 423, - 403, - 105, - 109, - 480, - 271, - 134, - 336, - 299, - 148, - 365, - 135, - 277, - 87, - 244, - 301, - 218, - 59, - 280, - 283, - 55, - 499, - 133, - 316, - 407, - 146, - 56, - 394, - 386, - 297, - 285, - 137, - 58, - 214, - 142, - 6, - 124, - 48, - 60, - 212, - 75, - 50, - 412, - 458, - 127, - 45, - 266, - 202, - 368, - 138, - 260, - 41, - 193, - 88, - 114, - 410, - 95, - 382, - 416, - 281, - 434, - 359, - 98, - 462, - 300, - 352, - 230, - 247, - 117, - 64, - 287, - 405, - 224, - 19, - 259, - 305, - 220, - 150, - 477, - 111, - 448, - 78, - 103, - 7, - 385, - 151, - 429, - 325, - 273, - 317, - 470, - 454, - 170, - 223, - 5, - 307, - 396, - 315, - 53, - 154, - 446, - 24, - 255, - 227, - 76, - 456, - 250, - 321, - 330, - 391, - 355, - 49, - 479, - 387, - 216, - 39, - 251, - 312, - 217, - 136, - 262, - 322, - 344, - 466, - 242, - 100, - 388, - 38, - 323, - 376, - 379, - 279, - 239, - 85, - 306, - 181, - 485, - 120, - 333, - 334, - 17, - 395, - 81, - 374, - 147, - 139, - 185, - 42, - 1, - 424, - 199, - 225, - 113, - 438, - 128, - 338, - 156, - 493, - 46, - 160, - 11, - 3, - 171, - 464, - 62, - 238, - 431, - 440, - 302, - 65, - 308, - 348, - 125, - 174, - 195, - 77, - 392, - 249, - 82, - 350, - 444, - 232, - 186, - 494, - 384, - 275, - 129, - 294, - 246, - 357, - 102, - 96, - 73, - 15, - 263, - 296, - 236, - 29, - 340, - 152, - 149, - 143, - 437, - 172, - 190, - 34, - 158, - 254, - 295, - 483, - 397, - 337, - 72, - 343, - 178, - 404, - 270, - 346, - 205, - 377, - 486, - 497, - 370, - 414, - 240, - 360, - 490, - 94, - 256, - 8, - 54, - 398, - 183, - 228, - 162, - 399, - 289, - 83, - 86, - 197, - 243, - 57, - 25, - 288, - 488, - 372, - 168, - 206, - 188, - 491, - 452, - 353, - 478, - 421, - 221, - 430, - 184, - 204, - 26, - 211, - 140, - 155, - 468, - 161, - 420, - 303, - 30, - 449, - 131, - 500, - 20, - 71, - 79, - 445, - 425, - 293, - 411, - 400, - 320, - 474, - 272, - 413, - 329, - 177, - 122, - 21, - 347, - 314, - 451, - 101, - 367, - 311, - 40, - 476, - 415, - 418, - 363, - 282, - 469, - 89, - 274, - 481, - 475, - 203, - 268, - 393, - 261, - 200, - 121, - 164, - 472, - 10, - 284, - 14, - 358, - 153, - 383, - 67, - 473, - 373, - 191, - 144, - 16, - 345, - 361, - 433, - 116, - 331, - 489, - 66, - 106, - 487, - 426, - 99, - 27, - 141, - 264, - 439, - 371, - 213, - 18, - 253, - 292, - 130, - 409, - 278, - 419, - 90, - 496, - 447, - 465, - 461, - 339, - 80, - 31, - 70, - 233, - 326, - 37, - 265, - 252, - 222, - 118, - 198, - 406, - 286, - 380, - 104, - 304, - 351, - 408, - 180, - 22, - 364, - 381, - 401, - 234, - 375, - 459, - 319, - 229, - 207, - 291, - 52, - 463, - 427, - 23, - 235, - 32, - 208, - 192, - 349, - 231, - 354, - 435, - 182, - 428, - 332, - 378, - 290, - 108, - 258, - 471, - 115, - 47, - 457, - 166, - 43, - 495, - 63, - 110, - 107, - 422, - 324 - ]` +func GetDB() *commonMsgDatabase { + config.Config.Mongo.DBAddress = []string{"192.168.44.128:37017"} + config.Config.Mongo.DBTimeout = 60 + config.Config.Mongo.DBDatabase = "openIM" + config.Config.Mongo.DBSource = "admin" + config.Config.Mongo.DBUserName = "root" + config.Config.Mongo.DBPassword = "openIM123" + config.Config.Mongo.DBMaxPoolSize = 100 + config.Config.Mongo.DBRetainChatRecords = 3650 + config.Config.Mongo.ChatRecordsClearTime = "0 2 * * 3" - var arr []int + mongo, err := unrelation.NewMongo() + if err != nil { + panic(err) + } + err = mongo.GetDatabase().Client().Ping(context.Background(), nil) + if err != nil { + panic(err) + } + return &commonMsgDatabase{ + msgDocDatabase: unrelation.NewMsgMongoDriver(mongo.GetDatabase()), + } +} + +func Test_Insert(t *testing.T) { + db := GetDB() + ctx := context.Background() + var arr []*unRelationTb.MsgInfoModel + for i := 0; i < 345; i++ { + arr = append(arr, &unRelationTb.MsgInfoModel{ + Msg: &unRelationTb.MsgDataModel{ + Seq: int64(i), + Content: fmt.Sprintf("test-%d", i), + }, + }) + } + if err := db.BatchInsertBlock(ctx, "test", arr, 0); err != nil { + t.Fatal(err) + } +} - if err := json.Unmarshal([]byte(s), &arr); err != nil { +func Test_Revoke(t *testing.T) { + db := GetDB() + ctx := context.Background() + var arr []*unRelationTb.MsgInfoModel + for i := 0; i < 456; i++ { + arr = append(arr, &unRelationTb.MsgInfoModel{ + Revoke: &unRelationTb.RevokeModel{ + UserID: "uid_" + strconv.Itoa(i), + Nickname: "uname_" + strconv.Itoa(i), + Time: time.Now().UnixMilli(), + }, + }) + } + if err := db.BatchInsertBlock(ctx, "test", arr, 123); err != nil { + t.Fatal(err) + } +} + +func Test_Delete(t *testing.T) { + db := GetDB() + ctx := context.Background() + var arr []*unRelationTb.MsgInfoModel + for i := 0; i < 123; i++ { + arr = append(arr, &unRelationTb.MsgInfoModel{ + DelList: []string{"uid_1", "uid_2"}, + }) + } + if err := db.BatchInsertBlock(ctx, "test", arr, 210); err != nil { + t.Fatal(err) + } +} + +func Test_Delete1(t *testing.T) { + config.Config.Mongo.DBAddress = []string{"192.168.44.128:37017"} + config.Config.Mongo.DBTimeout = 60 + config.Config.Mongo.DBDatabase = "openIM" + config.Config.Mongo.DBSource = "admin" + config.Config.Mongo.DBUserName = "root" + config.Config.Mongo.DBPassword = "openIM123" + config.Config.Mongo.DBMaxPoolSize = 100 + config.Config.Mongo.DBRetainChatRecords = 3650 + config.Config.Mongo.ChatRecordsClearTime = "0 2 * * 3" + + mongo, err := unrelation.NewMongo() + if err != nil { + panic(err) + } + err = mongo.GetDatabase().Client().Ping(context.Background(), nil) + if err != nil { panic(err) } - sort.Ints(arr) + c := mongo.GetClient().Database("openIM").Collection("msg") + + var o unRelationTb.MsgDocModel + + err = c.FindOne(context.Background(), bson.M{"doc_id": "test:0"}).Decode(&o) + if err != nil { + panic(err) + } - for i, v := range arr { - fmt.Println(i, v, v == i+1) - if v != i+1 { - panic(fmt.Sprintf("expected %d, got %d", i+1, v)) - } + for i, model := range o.Msg { + fmt.Println(i, model == nil) } } diff --git a/pkg/common/db/table/unrelation/msg.go b/pkg/common/db/table/unrelation/msg.go index 788c21d4d..dcd06d649 100644 --- a/pkg/common/db/table/unrelation/msg.go +++ b/pkg/common/db/table/unrelation/msg.go @@ -2,10 +2,10 @@ package unrelation import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" + "go.mongodb.org/mongo-driver/mongo" "strconv" "strings" - - "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" ) const ( @@ -16,22 +16,60 @@ const ( ) type MsgDocModel struct { - DocID string `bson:"doc_id"` - Msg []MsgInfoModel `bson:"msgs"` + DocID string `bson:"doc_id"` + Msg []*MsgInfoModel `bson:"msgs"` +} + +type RevokeModel struct { + UserID string `bson:"user_id"` + Nickname string `bson:"nickname"` + Time int64 `bson:"time"` +} + +type OfflinePushModel struct { + Title string `bson:"title"` + Desc string `bson:"desc"` + Ex string `bson:"ex"` + IOSPushSound string `bson:"ios_push_sound"` + IOSBadgeCount bool `bson:"ios_badge_count"` +} + +type MsgDataModel struct { + SendID string `bson:"send_id"` + RecvID string `bson:"recv_id"` + GroupID string `bson:"group_id"` + ClientMsgID string `bson:"client_msg_id"` + ServerMsgID string `bson:"server_msg_id"` + SenderPlatformID int32 `bson:"sender_platform_id"` + SenderNickname string `bson:"sender_nickname"` + SenderFaceURL string `bson:"sender_face_url"` + SessionType int32 `bson:"session_type"` + MsgFrom int32 `bson:"msg_from"` + ContentType int32 `bson:"content_type"` + Content string `bson:"content"` + Seq int64 `bson:"seq"` + SendTime int64 `bson:"send_time"` + CreateTime int64 `bson:"create_time"` + Status int32 `bson:"status"` + Options map[string]bool `bson:"options"` + OfflinePush *OfflinePushModel `bson:"offline_push"` + AtUserIDList []string `bson:"at_user_id_list"` + AttachedInfo string `bson:"attached_info"` + Ex string `bson:"ex"` } type MsgInfoModel struct { - SendTime int64 `bson:"sendtime"` - Msg []byte `bson:"msg"` - Revoke bool `bson:"revoke"` - ReadList []string `bson:"read_list"` - DelList []string `bson:"del_list"` + Msg *MsgDataModel `bson:"msg"` + Revoke *RevokeModel `bson:"revoke"` + DelList []string `bson:"del_list"` + ReadList []string `bson:"read_list"` } type MsgDocModelInterface interface { PushMsgsToDoc(ctx context.Context, docID string, msgsToMongo []MsgInfoModel) error Create(ctx context.Context, model *MsgDocModel) error - UpdateMsg(ctx context.Context, docID string, index int64, info *MsgInfoModel) error + UpdateMsg(ctx context.Context, docID string, index int64, key string, value any) (*mongo.UpdateResult, error) + PushUnique(ctx context.Context, docID string, index int64, key string, value any) (*mongo.UpdateResult, error) UpdateMsgContent(ctx context.Context, docID string, index int64, msg []byte) error IsExistDocID(ctx context.Context, docID string) (bool, error) UpdateMsgStatusByIndexInOneDoc(ctx context.Context, docID string, msg *sdkws.MsgData, seqIndex int, status int32) error @@ -54,7 +92,8 @@ func (MsgDocModel) GetSingleGocMsgNum() int64 { } func (m *MsgDocModel) IsFull() bool { - return m.Msg[len(m.Msg)-1].SendTime != 0 + //return m.Msg[len(m.Msg)-1].SendTime != 0 + return false } func (m MsgDocModel) GetDocID(conversationID string, seq int64) string { diff --git a/pkg/common/db/unrelation/msg.go b/pkg/common/db/unrelation/msg.go index b9ec543f2..16dcef95d 100644 --- a/pkg/common/db/unrelation/msg.go +++ b/pkg/common/db/unrelation/msg.go @@ -6,7 +6,6 @@ import ( "fmt" table "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/unrelation" - "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" "github.com/OpenIMSDK/Open-IM-Server/pkg/errs" "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" "github.com/OpenIMSDK/Open-IM-Server/pkg/utils" @@ -26,7 +25,16 @@ type MsgMongoDriver struct { } func NewMsgMongoDriver(database *mongo.Database) table.MsgDocModelInterface { - return &MsgMongoDriver{MsgCollection: database.Collection(table.MsgDocModel{}.TableName())} + collection := database.Collection(table.MsgDocModel{}.TableName()) + indexModel := mongo.IndexModel{ + Keys: bson.M{"doc_id": 1}, + Options: options.Index().SetUnique(true), + } + _, err := collection.Indexes().CreateOne(context.Background(), indexModel) + if err != nil { + panic(err) + } + return &MsgMongoDriver{MsgCollection: collection} } func (m *MsgMongoDriver) PushMsgsToDoc(ctx context.Context, docID string, msgsToMongo []table.MsgInfoModel) error { @@ -38,12 +46,41 @@ func (m *MsgMongoDriver) Create(ctx context.Context, model *table.MsgDocModel) e return err } -func (m *MsgMongoDriver) UpdateMsg(ctx context.Context, docID string, index int64, info *table.MsgInfoModel) error { - _, err := m.MsgCollection.UpdateOne(ctx, bson.M{"doc_id": docID}, bson.M{"$set": bson.M{fmt.Sprintf("msgs.%d", index): info}}) +func (m *MsgMongoDriver) UpdateMsg(ctx context.Context, docID string, index int64, key string, value any) (*mongo.UpdateResult, error) { + var field string + if key == "" { + field = fmt.Sprintf("msgs.%d", index) + } else { + field = fmt.Sprintf("msgs.%d.%s", index, key) + } + filter := bson.M{"doc_id": docID} + update := bson.M{"$set": bson.M{field: value}} + res, err := m.MsgCollection.UpdateOne(ctx, filter, update) if err != nil { - return utils.Wrap(err, "") + return nil, utils.Wrap(err, "") } - return nil + return res, nil +} + +// PushUnique value must slice +func (m *MsgMongoDriver) PushUnique(ctx context.Context, docID string, index int64, key string, value any) (*mongo.UpdateResult, error) { + var field string + if key == "" { + field = fmt.Sprintf("msgs.%d", index) + } else { + field = fmt.Sprintf("msgs.%d.%s", index, key) + } + filter := bson.M{"doc_id": docID} + update := bson.M{ + "$addToSet": bson.M{ + field: bson.M{"$each": value}, + }, + } + res, err := m.MsgCollection.UpdateOne(ctx, filter, update) + if err != nil { + return nil, utils.Wrap(err, "") + } + return res, nil } func (m *MsgMongoDriver) UpdateMsgContent(ctx context.Context, docID string, index int64, msg []byte) error { @@ -74,33 +111,33 @@ func (m *MsgMongoDriver) FindOneByDocID(ctx context.Context, docID string) (*tab } func (m *MsgMongoDriver) GetMsgAndIndexBySeqsInOneDoc(ctx context.Context, docID string, seqs []int64) (seqMsgs []*sdkws.MsgData, indexes []int, unExistSeqs []int64, err error) { - doc, err := m.FindOneByDocID(ctx, docID) - if err != nil { - return nil, nil, nil, err - } - singleCount := 0 - var hasSeqList []int64 - for i := 0; i < len(doc.Msg); i++ { - var msg sdkws.MsgData - if err := proto.Unmarshal(doc.Msg[i].Msg, &msg); err != nil { - return nil, nil, nil, err - } - if utils.Contain(msg.Seq, seqs...) { - indexes = append(indexes, i) - seqMsgs = append(seqMsgs, &msg) - hasSeqList = append(hasSeqList, msg.Seq) - singleCount++ - if singleCount == len(seqs) { - break - } - } - } - for _, i := range seqs { - if utils.Contain(i, hasSeqList...) { - continue - } - unExistSeqs = append(unExistSeqs, i) - } + //doc, err := m.FindOneByDocID(ctx, docID) + //if err != nil { + // return nil, nil, nil, err + //} + //singleCount := 0 + //var hasSeqList []int64 + //for i := 0; i < len(doc.Msg); i++ { + // var msg sdkws.MsgData + // if err := proto.Unmarshal(doc.Msg[i].Msg, &msg); err != nil { + // return nil, nil, nil, err + // } + // if utils.Contain(msg.Seq, seqs...) { + // indexes = append(indexes, i) + // seqMsgs = append(seqMsgs, &msg) + // hasSeqList = append(hasSeqList, msg.Seq) + // singleCount++ + // if singleCount == len(seqs) { + // break + // } + // } + //} + //for _, i := range seqs { + // if utils.Contain(i, hasSeqList...) { + // continue + // } + // unExistSeqs = append(unExistSeqs, i) + //} return seqMsgs, indexes, unExistSeqs, nil } @@ -122,49 +159,49 @@ func (m *MsgMongoDriver) GetMsgsByIndex(ctx context.Context, conversationID stri } func (m *MsgMongoDriver) GetNewestMsg(ctx context.Context, conversationID string) (*table.MsgInfoModel, error) { - var msgDocs []table.MsgDocModel - cursor, err := m.MsgCollection.Find(ctx, bson.M{"doc_id": bson.M{"$regex": fmt.Sprintf("^%s:", conversationID)}}, options.Find().SetLimit(1).SetSort(bson.M{"doc_id": -1})) - if err != nil { - return nil, utils.Wrap(err, "") - } - err = cursor.All(ctx, &msgDocs) - if err != nil { - return nil, utils.Wrap(err, "") - } - if len(msgDocs) > 0 { - if len(msgDocs[0].Msg) > 0 { - return &msgDocs[0].Msg[len(msgDocs[0].Msg)-1], nil - } - return nil, errs.ErrRecordNotFound.Wrap("len(msgDocs[0].Msgs) < 0") - } + //var msgDocs []table.MsgDocModel + //cursor, err := m.MsgCollection.Find(ctx, bson.M{"doc_id": bson.M{"$regex": fmt.Sprintf("^%s:", conversationID)}}, options.Find().SetLimit(1).SetSort(bson.M{"doc_id": -1})) + //if err != nil { + // return nil, utils.Wrap(err, "") + //} + //err = cursor.All(ctx, &msgDocs) + //if err != nil { + // return nil, utils.Wrap(err, "") + //} + //if len(msgDocs) > 0 { + // if len(msgDocs[0].Msg) > 0 { + // return &msgDocs[0].Msg[len(msgDocs[0].Msg)-1], nil + // } + // return nil, errs.ErrRecordNotFound.Wrap("len(msgDocs[0].Msgs) < 0") + //} return nil, ErrMsgNotFound } func (m *MsgMongoDriver) GetOldestMsg(ctx context.Context, conversationID string) (*table.MsgInfoModel, error) { - var msgDocs []table.MsgDocModel - cursor, err := m.MsgCollection.Find(ctx, bson.M{"doc_id": bson.M{"$regex": fmt.Sprintf("^%s:", conversationID)}}, options.Find().SetLimit(1).SetSort(bson.M{"doc_id": 1})) - if err != nil { - return nil, err - } - err = cursor.All(ctx, &msgDocs) - if err != nil { - return nil, utils.Wrap(err, "") - } - var oldestMsg table.MsgInfoModel - if len(msgDocs) > 0 { - for _, v := range msgDocs[0].Msg { - if v.SendTime != 0 { - oldestMsg = v - break - } - } - if len(oldestMsg.Msg) == 0 { - if len(msgDocs[0].Msg) > 0 { - oldestMsg = msgDocs[0].Msg[0] - } - } - return &oldestMsg, nil - } + //var msgDocs []table.MsgDocModel + //cursor, err := m.MsgCollection.Find(ctx, bson.M{"doc_id": bson.M{"$regex": fmt.Sprintf("^%s:", conversationID)}}, options.Find().SetLimit(1).SetSort(bson.M{"doc_id": 1})) + //if err != nil { + // return nil, err + //} + //err = cursor.All(ctx, &msgDocs) + //if err != nil { + // return nil, utils.Wrap(err, "") + //} + //var oldestMsg table.MsgInfoModel + //if len(msgDocs) > 0 { + // for _, v := range msgDocs[0].Msg { + // if v.SendTime != 0 { + // oldestMsg = v + // break + // } + // } + // if len(oldestMsg.Msg) == 0 { + // if len(msgDocs[0].Msg) > 0 { + // oldestMsg = msgDocs[0].Msg[0] + // } + // } + // return &oldestMsg, nil + //} return nil, ErrMsgNotFound } @@ -182,50 +219,50 @@ func (m *MsgMongoDriver) UpdateOneDoc(ctx context.Context, msg *table.MsgDocMode } func (m *MsgMongoDriver) GetMsgBySeqIndexIn1Doc(ctx context.Context, docID string, seqs []int64) (msgs []*sdkws.MsgData, err error) { - beginSeq, endSeq := utils.GetSeqsBeginEnd(seqs) - beginIndex := m.msg.GetMsgIndex(beginSeq) - num := endSeq - beginSeq + 1 - pipeline := bson.A{ - bson.M{ - "$match": bson.M{"doc_id": docID}, - }, - bson.M{ - "$project": bson.M{ - "msgs": bson.M{ - "$slice": bson.A{"$msgs", beginIndex, num}, - }, - }, - }, - } - cursor, err := m.MsgCollection.Aggregate(ctx, pipeline) - if err != nil { - return nil, errs.Wrap(err) - } - defer cursor.Close(ctx) - var doc table.MsgDocModel - i := 0 - for cursor.Next(ctx) { - err := cursor.Decode(&doc) - if err != nil { - return nil, err - } - if i == 0 { - break - } - } - log.ZDebug(ctx, "msgInfos", "num", len(doc.Msg), "docID", docID) - for _, v := range doc.Msg { - var msg sdkws.MsgData - if err := proto.Unmarshal(v.Msg, &msg); err != nil { - return nil, err - } - if msg.Seq >= beginSeq && msg.Seq <= endSeq { - log.ZDebug(ctx, "find msg", "msg", &msg) - msgs = append(msgs, &msg) - } else { - log.ZWarn(ctx, "this msg is at wrong position", nil, "msg", &msg) - } - } + //beginSeq, endSeq := utils.GetSeqsBeginEnd(seqs) + //beginIndex := m.msg.GetMsgIndex(beginSeq) + //num := endSeq - beginSeq + 1 + //pipeline := bson.A{ + // bson.M{ + // "$match": bson.M{"doc_id": docID}, + // }, + // bson.M{ + // "$project": bson.M{ + // "msgs": bson.M{ + // "$slice": bson.A{"$msgs", beginIndex, num}, + // }, + // }, + // }, + //} + //cursor, err := m.MsgCollection.Aggregate(ctx, pipeline) + //if err != nil { + // return nil, errs.Wrap(err) + //} + //defer cursor.Close(ctx) + //var doc table.MsgDocModel + //i := 0 + //for cursor.Next(ctx) { + // err := cursor.Decode(&doc) + // if err != nil { + // return nil, err + // } + // if i == 0 { + // break + // } + //} + //log.ZDebug(ctx, "msgInfos", "num", len(doc.Msg), "docID", docID) + //for _, v := range doc.Msg { + // var msg sdkws.MsgData + // if err := proto.Unmarshal(v.Msg, &msg); err != nil { + // return nil, err + // } + // if msg.Seq >= beginSeq && msg.Seq <= endSeq { + // log.ZDebug(ctx, "find msg", "msg", &msg) + // msgs = append(msgs, &msg) + // } else { + // log.ZWarn(ctx, "this msg is at wrong position", nil, "msg", &msg) + // } + //} return msgs, nil } diff --git a/pkg/proto/msg/msg.pb.go b/pkg/proto/msg/msg.pb.go index 8a0f8d4f6..7751270b2 100644 --- a/pkg/proto/msg/msg.pb.go +++ b/pkg/proto/msg/msg.pb.go @@ -458,16 +458,16 @@ func (x *SendMsgResp) GetSendTime() int64 { return 0 } -type ClearMsgReq struct { +type SetSendMsgStatusReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` + Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status"` } -func (x *ClearMsgReq) Reset() { - *x = ClearMsgReq{} +func (x *SetSendMsgStatusReq) Reset() { + *x = SetSendMsgStatusReq{} if protoimpl.UnsafeEnabled { mi := &file_msg_msg_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -475,13 +475,13 @@ func (x *ClearMsgReq) Reset() { } } -func (x *ClearMsgReq) String() string { +func (x *SetSendMsgStatusReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ClearMsgReq) ProtoMessage() {} +func (*SetSendMsgStatusReq) ProtoMessage() {} -func (x *ClearMsgReq) ProtoReflect() protoreflect.Message { +func (x *SetSendMsgStatusReq) ProtoReflect() protoreflect.Message { mi := &file_msg_msg_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -493,26 +493,26 @@ func (x *ClearMsgReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ClearMsgReq.ProtoReflect.Descriptor instead. -func (*ClearMsgReq) Descriptor() ([]byte, []int) { +// Deprecated: Use SetSendMsgStatusReq.ProtoReflect.Descriptor instead. +func (*SetSendMsgStatusReq) Descriptor() ([]byte, []int) { return file_msg_msg_proto_rawDescGZIP(), []int{8} } -func (x *ClearMsgReq) GetUserID() string { +func (x *SetSendMsgStatusReq) GetStatus() int32 { if x != nil { - return x.UserID + return x.Status } - return "" + return 0 } -type ClearMsgResp struct { +type SetSendMsgStatusResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *ClearMsgResp) Reset() { - *x = ClearMsgResp{} +func (x *SetSendMsgStatusResp) Reset() { + *x = SetSendMsgStatusResp{} if protoimpl.UnsafeEnabled { mi := &file_msg_msg_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -520,13 +520,13 @@ func (x *ClearMsgResp) Reset() { } } -func (x *ClearMsgResp) String() string { +func (x *SetSendMsgStatusResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ClearMsgResp) ProtoMessage() {} +func (*SetSendMsgStatusResp) ProtoMessage() {} -func (x *ClearMsgResp) ProtoReflect() protoreflect.Message { +func (x *SetSendMsgStatusResp) ProtoReflect() protoreflect.Message { mi := &file_msg_msg_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -538,23 +538,19 @@ func (x *ClearMsgResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ClearMsgResp.ProtoReflect.Descriptor instead. -func (*ClearMsgResp) Descriptor() ([]byte, []int) { +// Deprecated: Use SetSendMsgStatusResp.ProtoReflect.Descriptor instead. +func (*SetSendMsgStatusResp) Descriptor() ([]byte, []int) { return file_msg_msg_proto_rawDescGZIP(), []int{9} } -type SetMsgMinSeqReq struct { +type GetSendMsgStatusReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` - GroupID string `protobuf:"bytes,2,opt,name=groupID,proto3" json:"groupID"` - MinSeq uint32 `protobuf:"varint,3,opt,name=minSeq,proto3" json:"minSeq"` } -func (x *SetMsgMinSeqReq) Reset() { - *x = SetMsgMinSeqReq{} +func (x *GetSendMsgStatusReq) Reset() { + *x = GetSendMsgStatusReq{} if protoimpl.UnsafeEnabled { mi := &file_msg_msg_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -562,13 +558,13 @@ func (x *SetMsgMinSeqReq) Reset() { } } -func (x *SetMsgMinSeqReq) String() string { +func (x *GetSendMsgStatusReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SetMsgMinSeqReq) ProtoMessage() {} +func (*GetSendMsgStatusReq) ProtoMessage() {} -func (x *SetMsgMinSeqReq) ProtoReflect() protoreflect.Message { +func (x *GetSendMsgStatusReq) ProtoReflect() protoreflect.Message { mi := &file_msg_msg_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -580,40 +576,21 @@ func (x *SetMsgMinSeqReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SetMsgMinSeqReq.ProtoReflect.Descriptor instead. -func (*SetMsgMinSeqReq) Descriptor() ([]byte, []int) { +// Deprecated: Use GetSendMsgStatusReq.ProtoReflect.Descriptor instead. +func (*GetSendMsgStatusReq) Descriptor() ([]byte, []int) { return file_msg_msg_proto_rawDescGZIP(), []int{10} } -func (x *SetMsgMinSeqReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *SetMsgMinSeqReq) GetGroupID() string { - if x != nil { - return x.GroupID - } - return "" -} - -func (x *SetMsgMinSeqReq) GetMinSeq() uint32 { - if x != nil { - return x.MinSeq - } - return 0 -} - -type SetMsgMinSeqResp struct { +type GetSendMsgStatusResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status"` } -func (x *SetMsgMinSeqResp) Reset() { - *x = SetMsgMinSeqResp{} +func (x *GetSendMsgStatusResp) Reset() { + *x = GetSendMsgStatusResp{} if protoimpl.UnsafeEnabled { mi := &file_msg_msg_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -621,13 +598,13 @@ func (x *SetMsgMinSeqResp) Reset() { } } -func (x *SetMsgMinSeqResp) String() string { +func (x *GetSendMsgStatusResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SetMsgMinSeqResp) ProtoMessage() {} +func (*GetSendMsgStatusResp) ProtoMessage() {} -func (x *SetMsgMinSeqResp) ProtoReflect() protoreflect.Message { +func (x *GetSendMsgStatusResp) ProtoReflect() protoreflect.Message { mi := &file_msg_msg_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -639,21 +616,36 @@ func (x *SetMsgMinSeqResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SetMsgMinSeqResp.ProtoReflect.Descriptor instead. -func (*SetMsgMinSeqResp) Descriptor() ([]byte, []int) { +// Deprecated: Use GetSendMsgStatusResp.ProtoReflect.Descriptor instead. +func (*GetSendMsgStatusResp) Descriptor() ([]byte, []int) { return file_msg_msg_proto_rawDescGZIP(), []int{11} } -type SetSendMsgStatusReq struct { +func (x *GetSendMsgStatusResp) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +type ModifyMessageReactionExtensionsReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status"` + ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"` + SessionType int32 `protobuf:"varint,2,opt,name=sessionType,proto3" json:"sessionType"` + ReactionExtensions map[string]*sdkws.KeyValue `protobuf:"bytes,3,rep,name=reactionExtensions,proto3" json:"reactionExtensions" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + ClientMsgID string `protobuf:"bytes,4,opt,name=clientMsgID,proto3" json:"clientMsgID"` + Ex *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=ex,proto3" json:"ex"` + AttachedInfo *wrapperspb.StringValue `protobuf:"bytes,6,opt,name=attachedInfo,proto3" json:"attachedInfo"` + IsReact bool `protobuf:"varint,7,opt,name=isReact,proto3" json:"isReact"` + IsExternalExtensions bool `protobuf:"varint,8,opt,name=isExternalExtensions,proto3" json:"isExternalExtensions"` + MsgFirstModifyTime int64 `protobuf:"varint,9,opt,name=msgFirstModifyTime,proto3" json:"msgFirstModifyTime"` } -func (x *SetSendMsgStatusReq) Reset() { - *x = SetSendMsgStatusReq{} +func (x *ModifyMessageReactionExtensionsReq) Reset() { + *x = ModifyMessageReactionExtensionsReq{} if protoimpl.UnsafeEnabled { mi := &file_msg_msg_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -661,13 +653,13 @@ func (x *SetSendMsgStatusReq) Reset() { } } -func (x *SetSendMsgStatusReq) String() string { +func (x *ModifyMessageReactionExtensionsReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SetSendMsgStatusReq) ProtoMessage() {} +func (*ModifyMessageReactionExtensionsReq) ProtoMessage() {} -func (x *SetSendMsgStatusReq) ProtoReflect() protoreflect.Message { +func (x *ModifyMessageReactionExtensionsReq) ProtoReflect() protoreflect.Message { mi := &file_msg_msg_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -679,119 +671,107 @@ func (x *SetSendMsgStatusReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SetSendMsgStatusReq.ProtoReflect.Descriptor instead. -func (*SetSendMsgStatusReq) Descriptor() ([]byte, []int) { +// Deprecated: Use ModifyMessageReactionExtensionsReq.ProtoReflect.Descriptor instead. +func (*ModifyMessageReactionExtensionsReq) Descriptor() ([]byte, []int) { return file_msg_msg_proto_rawDescGZIP(), []int{12} } -func (x *SetSendMsgStatusReq) GetStatus() int32 { +func (x *ModifyMessageReactionExtensionsReq) GetConversationID() string { if x != nil { - return x.Status + return x.ConversationID } - return 0 -} - -type SetSendMsgStatusResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields + return "" } -func (x *SetSendMsgStatusResp) Reset() { - *x = SetSendMsgStatusResp{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *ModifyMessageReactionExtensionsReq) GetSessionType() int32 { + if x != nil { + return x.SessionType } + return 0 } -func (x *SetSendMsgStatusResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SetSendMsgStatusResp) ProtoMessage() {} - -func (x *SetSendMsgStatusResp) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *ModifyMessageReactionExtensionsReq) GetReactionExtensions() map[string]*sdkws.KeyValue { + if x != nil { + return x.ReactionExtensions } - return mi.MessageOf(x) + return nil } -// Deprecated: Use SetSendMsgStatusResp.ProtoReflect.Descriptor instead. -func (*SetSendMsgStatusResp) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{13} +func (x *ModifyMessageReactionExtensionsReq) GetClientMsgID() string { + if x != nil { + return x.ClientMsgID + } + return "" } -type GetSendMsgStatusReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +func (x *ModifyMessageReactionExtensionsReq) GetEx() *wrapperspb.StringValue { + if x != nil { + return x.Ex + } + return nil } -func (x *GetSendMsgStatusReq) Reset() { - *x = GetSendMsgStatusReq{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *ModifyMessageReactionExtensionsReq) GetAttachedInfo() *wrapperspb.StringValue { + if x != nil { + return x.AttachedInfo } + return nil } -func (x *GetSendMsgStatusReq) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *ModifyMessageReactionExtensionsReq) GetIsReact() bool { + if x != nil { + return x.IsReact + } + return false } -func (*GetSendMsgStatusReq) ProtoMessage() {} - -func (x *GetSendMsgStatusReq) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *ModifyMessageReactionExtensionsReq) GetIsExternalExtensions() bool { + if x != nil { + return x.IsExternalExtensions } - return mi.MessageOf(x) + return false } -// Deprecated: Use GetSendMsgStatusReq.ProtoReflect.Descriptor instead. -func (*GetSendMsgStatusReq) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{14} +func (x *ModifyMessageReactionExtensionsReq) GetMsgFirstModifyTime() int64 { + if x != nil { + return x.MsgFirstModifyTime + } + return 0 } -type GetSendMsgStatusResp struct { +type SetMessageReactionExtensionsReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status"` + ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"` + SessionType int32 `protobuf:"varint,2,opt,name=sessionType,proto3" json:"sessionType"` + ReactionExtensions map[string]*sdkws.KeyValue `protobuf:"bytes,3,rep,name=reactionExtensions,proto3" json:"reactionExtensions" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + ClientMsgID string `protobuf:"bytes,4,opt,name=clientMsgID,proto3" json:"clientMsgID"` + Ex *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=ex,proto3" json:"ex"` + AttachedInfo *wrapperspb.StringValue `protobuf:"bytes,6,opt,name=attachedInfo,proto3" json:"attachedInfo"` + IsReact bool `protobuf:"varint,7,opt,name=isReact,proto3" json:"isReact"` + IsExternalExtensions bool `protobuf:"varint,8,opt,name=isExternalExtensions,proto3" json:"isExternalExtensions"` + MsgFirstModifyTime int64 `protobuf:"varint,9,opt,name=msgFirstModifyTime,proto3" json:"msgFirstModifyTime"` } -func (x *GetSendMsgStatusResp) Reset() { - *x = GetSendMsgStatusResp{} +func (x *SetMessageReactionExtensionsReq) Reset() { + *x = SetMessageReactionExtensionsReq{} if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[15] + mi := &file_msg_msg_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetSendMsgStatusResp) String() string { +func (x *SetMessageReactionExtensionsReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetSendMsgStatusResp) ProtoMessage() {} +func (*SetMessageReactionExtensionsReq) ProtoMessage() {} -func (x *GetSendMsgStatusResp) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[15] +func (x *SetMessageReactionExtensionsReq) ProtoReflect() protoreflect.Message { + mi := &file_msg_msg_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -802,96 +782,102 @@ func (x *GetSendMsgStatusResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetSendMsgStatusResp.ProtoReflect.Descriptor instead. -func (*GetSendMsgStatusResp) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{15} +// Deprecated: Use SetMessageReactionExtensionsReq.ProtoReflect.Descriptor instead. +func (*SetMessageReactionExtensionsReq) Descriptor() ([]byte, []int) { + return file_msg_msg_proto_rawDescGZIP(), []int{13} } -func (x *GetSendMsgStatusResp) GetStatus() int32 { +func (x *SetMessageReactionExtensionsReq) GetConversationID() string { if x != nil { - return x.Status + return x.ConversationID } - return 0 + return "" } -type DelSuperGroupMsgReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` - GroupID string `protobuf:"bytes,2,opt,name=groupID,proto3" json:"groupID"` +func (x *SetMessageReactionExtensionsReq) GetSessionType() int32 { + if x != nil { + return x.SessionType + } + return 0 } -func (x *DelSuperGroupMsgReq) Reset() { - *x = DelSuperGroupMsgReq{} - if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +func (x *SetMessageReactionExtensionsReq) GetReactionExtensions() map[string]*sdkws.KeyValue { + if x != nil { + return x.ReactionExtensions } + return nil } -func (x *DelSuperGroupMsgReq) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *SetMessageReactionExtensionsReq) GetClientMsgID() string { + if x != nil { + return x.ClientMsgID + } + return "" } -func (*DelSuperGroupMsgReq) ProtoMessage() {} - -func (x *DelSuperGroupMsgReq) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms +func (x *SetMessageReactionExtensionsReq) GetEx() *wrapperspb.StringValue { + if x != nil { + return x.Ex } - return mi.MessageOf(x) + return nil } -// Deprecated: Use DelSuperGroupMsgReq.ProtoReflect.Descriptor instead. -func (*DelSuperGroupMsgReq) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{16} +func (x *SetMessageReactionExtensionsReq) GetAttachedInfo() *wrapperspb.StringValue { + if x != nil { + return x.AttachedInfo + } + return nil } -func (x *DelSuperGroupMsgReq) GetUserID() string { +func (x *SetMessageReactionExtensionsReq) GetIsReact() bool { if x != nil { - return x.UserID + return x.IsReact } - return "" + return false } -func (x *DelSuperGroupMsgReq) GetGroupID() string { +func (x *SetMessageReactionExtensionsReq) GetIsExternalExtensions() bool { if x != nil { - return x.GroupID + return x.IsExternalExtensions } - return "" + return false +} + +func (x *SetMessageReactionExtensionsReq) GetMsgFirstModifyTime() int64 { + if x != nil { + return x.MsgFirstModifyTime + } + return 0 } -type DelSuperGroupMsgResp struct { +type SetMessageReactionExtensionsResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + ClientMsgID string `protobuf:"bytes,1,opt,name=clientMsgID,proto3" json:"clientMsgID"` + MsgFirstModifyTime int64 `protobuf:"varint,2,opt,name=msgFirstModifyTime,proto3" json:"msgFirstModifyTime"` + IsReact bool `protobuf:"varint,3,opt,name=isReact,proto3" json:"isReact"` + Result []*KeyValueResp `protobuf:"bytes,4,rep,name=result,proto3" json:"result"` } -func (x *DelSuperGroupMsgResp) Reset() { - *x = DelSuperGroupMsgResp{} +func (x *SetMessageReactionExtensionsResp) Reset() { + *x = SetMessageReactionExtensionsResp{} if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[17] + mi := &file_msg_msg_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *DelSuperGroupMsgResp) String() string { +func (x *SetMessageReactionExtensionsResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DelSuperGroupMsgResp) ProtoMessage() {} +func (*SetMessageReactionExtensionsResp) ProtoMessage() {} -func (x *DelSuperGroupMsgResp) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[17] +func (x *SetMessageReactionExtensionsResp) ProtoReflect() protoreflect.Message { + mi := &file_msg_msg_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -902,37 +888,67 @@ func (x *DelSuperGroupMsgResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DelSuperGroupMsgResp.ProtoReflect.Descriptor instead. -func (*DelSuperGroupMsgResp) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{17} +// Deprecated: Use SetMessageReactionExtensionsResp.ProtoReflect.Descriptor instead. +func (*SetMessageReactionExtensionsResp) Descriptor() ([]byte, []int) { + return file_msg_msg_proto_rawDescGZIP(), []int{14} +} + +func (x *SetMessageReactionExtensionsResp) GetClientMsgID() string { + if x != nil { + return x.ClientMsgID + } + return "" +} + +func (x *SetMessageReactionExtensionsResp) GetMsgFirstModifyTime() int64 { + if x != nil { + return x.MsgFirstModifyTime + } + return 0 +} + +func (x *SetMessageReactionExtensionsResp) GetIsReact() bool { + if x != nil { + return x.IsReact + } + return false +} + +func (x *SetMessageReactionExtensionsResp) GetResult() []*KeyValueResp { + if x != nil { + return x.Result + } + return nil } -type GetSuperGroupMsgReq struct { +type GetMessagesReactionExtensionsReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Seq int64 `protobuf:"varint,1,opt,name=Seq,proto3" json:"Seq"` - GroupID string `protobuf:"bytes,2,opt,name=groupID,proto3" json:"groupID"` + ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"` + SessionType int32 `protobuf:"varint,2,opt,name=sessionType,proto3" json:"sessionType"` + MessageReactionKeys []*GetMessagesReactionExtensionsReq_MessageReactionKey `protobuf:"bytes,3,rep,name=messageReactionKeys,proto3" json:"messageReactionKeys"` + TypeKeys []string `protobuf:"bytes,4,rep,name=TypeKeys,proto3" json:"TypeKeys"` } -func (x *GetSuperGroupMsgReq) Reset() { - *x = GetSuperGroupMsgReq{} +func (x *GetMessagesReactionExtensionsReq) Reset() { + *x = GetMessagesReactionExtensionsReq{} if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[18] + mi := &file_msg_msg_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetSuperGroupMsgReq) String() string { +func (x *GetMessagesReactionExtensionsReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetSuperGroupMsgReq) ProtoMessage() {} +func (*GetMessagesReactionExtensionsReq) ProtoMessage() {} -func (x *GetSuperGroupMsgReq) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[18] +func (x *GetMessagesReactionExtensionsReq) ProtoReflect() protoreflect.Message { + mi := &file_msg_msg_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -943,50 +959,64 @@ func (x *GetSuperGroupMsgReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetSuperGroupMsgReq.ProtoReflect.Descriptor instead. -func (*GetSuperGroupMsgReq) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{18} +// Deprecated: Use GetMessagesReactionExtensionsReq.ProtoReflect.Descriptor instead. +func (*GetMessagesReactionExtensionsReq) Descriptor() ([]byte, []int) { + return file_msg_msg_proto_rawDescGZIP(), []int{15} } -func (x *GetSuperGroupMsgReq) GetSeq() int64 { +func (x *GetMessagesReactionExtensionsReq) GetConversationID() string { if x != nil { - return x.Seq + return x.ConversationID + } + return "" +} + +func (x *GetMessagesReactionExtensionsReq) GetSessionType() int32 { + if x != nil { + return x.SessionType } return 0 } -func (x *GetSuperGroupMsgReq) GetGroupID() string { +func (x *GetMessagesReactionExtensionsReq) GetMessageReactionKeys() []*GetMessagesReactionExtensionsReq_MessageReactionKey { if x != nil { - return x.GroupID + return x.MessageReactionKeys } - return "" + return nil +} + +func (x *GetMessagesReactionExtensionsReq) GetTypeKeys() []string { + if x != nil { + return x.TypeKeys + } + return nil } -type GetSuperGroupMsgResp struct { +type GetMessagesReactionExtensionsResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - MsgData *sdkws.MsgData `protobuf:"bytes,1,opt,name=msgData,proto3" json:"msgData"` + SingleMessageResult []*SingleMessageExtensionResult `protobuf:"bytes,1,rep,name=singleMessageResult,proto3" json:"singleMessageResult"` } -func (x *GetSuperGroupMsgResp) Reset() { - *x = GetSuperGroupMsgResp{} +func (x *GetMessagesReactionExtensionsResp) Reset() { + *x = GetMessagesReactionExtensionsResp{} if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[19] + mi := &file_msg_msg_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetSuperGroupMsgResp) String() string { +func (x *GetMessagesReactionExtensionsResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetSuperGroupMsgResp) ProtoMessage() {} +func (*GetMessagesReactionExtensionsResp) ProtoMessage() {} -func (x *GetSuperGroupMsgResp) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[19] +func (x *GetMessagesReactionExtensionsResp) ProtoReflect() protoreflect.Message { + mi := &file_msg_msg_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -997,43 +1027,44 @@ func (x *GetSuperGroupMsgResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetSuperGroupMsgResp.ProtoReflect.Descriptor instead. -func (*GetSuperGroupMsgResp) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{19} +// Deprecated: Use GetMessagesReactionExtensionsResp.ProtoReflect.Descriptor instead. +func (*GetMessagesReactionExtensionsResp) Descriptor() ([]byte, []int) { + return file_msg_msg_proto_rawDescGZIP(), []int{16} } -func (x *GetSuperGroupMsgResp) GetMsgData() *sdkws.MsgData { +func (x *GetMessagesReactionExtensionsResp) GetSingleMessageResult() []*SingleMessageExtensionResult { if x != nil { - return x.MsgData + return x.SingleMessageResult } return nil } -type GetWriteDiffMsgReq struct { +type SingleMessageExtensionResult struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Seq int64 `protobuf:"varint,1,opt,name=Seq,proto3" json:"Seq"` + ReactionExtensions map[string]*sdkws.KeyValue `protobuf:"bytes,1,rep,name=reactionExtensions,proto3" json:"reactionExtensions" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + ClientMsgID string `protobuf:"bytes,2,opt,name=clientMsgID,proto3" json:"clientMsgID"` } -func (x *GetWriteDiffMsgReq) Reset() { - *x = GetWriteDiffMsgReq{} +func (x *SingleMessageExtensionResult) Reset() { + *x = SingleMessageExtensionResult{} if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[20] + mi := &file_msg_msg_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetWriteDiffMsgReq) String() string { +func (x *SingleMessageExtensionResult) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetWriteDiffMsgReq) ProtoMessage() {} +func (*SingleMessageExtensionResult) ProtoMessage() {} -func (x *GetWriteDiffMsgReq) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[20] +func (x *SingleMessageExtensionResult) ProtoReflect() protoreflect.Message { + mi := &file_msg_msg_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1044,43 +1075,51 @@ func (x *GetWriteDiffMsgReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetWriteDiffMsgReq.ProtoReflect.Descriptor instead. -func (*GetWriteDiffMsgReq) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{20} +// Deprecated: Use SingleMessageExtensionResult.ProtoReflect.Descriptor instead. +func (*SingleMessageExtensionResult) Descriptor() ([]byte, []int) { + return file_msg_msg_proto_rawDescGZIP(), []int{17} } -func (x *GetWriteDiffMsgReq) GetSeq() int64 { +func (x *SingleMessageExtensionResult) GetReactionExtensions() map[string]*sdkws.KeyValue { if x != nil { - return x.Seq + return x.ReactionExtensions } - return 0 + return nil +} + +func (x *SingleMessageExtensionResult) GetClientMsgID() string { + if x != nil { + return x.ClientMsgID + } + return "" } -type GetWriteDiffMsgResp struct { +type ModifyMessageReactionExtensionsResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - MsgData *sdkws.MsgData `protobuf:"bytes,2,opt,name=msgData,proto3" json:"msgData"` + SuccessList []*ExtendMsgResp `protobuf:"bytes,1,rep,name=successList,proto3" json:"successList"` + FailedList []*ExtendMsgResp `protobuf:"bytes,2,rep,name=failedList,proto3" json:"failedList"` } -func (x *GetWriteDiffMsgResp) Reset() { - *x = GetWriteDiffMsgResp{} +func (x *ModifyMessageReactionExtensionsResp) Reset() { + *x = ModifyMessageReactionExtensionsResp{} if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[21] + mi := &file_msg_msg_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetWriteDiffMsgResp) String() string { +func (x *ModifyMessageReactionExtensionsResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetWriteDiffMsgResp) ProtoMessage() {} +func (*ModifyMessageReactionExtensionsResp) ProtoMessage() {} -func (x *GetWriteDiffMsgResp) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[21] +func (x *ModifyMessageReactionExtensionsResp) ProtoReflect() protoreflect.Message { + mi := &file_msg_msg_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1091,51 +1130,57 @@ func (x *GetWriteDiffMsgResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetWriteDiffMsgResp.ProtoReflect.Descriptor instead. -func (*GetWriteDiffMsgResp) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{21} +// Deprecated: Use ModifyMessageReactionExtensionsResp.ProtoReflect.Descriptor instead. +func (*ModifyMessageReactionExtensionsResp) Descriptor() ([]byte, []int) { + return file_msg_msg_proto_rawDescGZIP(), []int{18} } -func (x *GetWriteDiffMsgResp) GetMsgData() *sdkws.MsgData { +func (x *ModifyMessageReactionExtensionsResp) GetSuccessList() []*ExtendMsgResp { if x != nil { - return x.MsgData + return x.SuccessList } return nil } -type ModifyMessageReactionExtensionsReq struct { +func (x *ModifyMessageReactionExtensionsResp) GetFailedList() []*ExtendMsgResp { + if x != nil { + return x.FailedList + } + return nil +} + +type DeleteMessagesReactionExtensionsReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"` - SessionType int32 `protobuf:"varint,2,opt,name=sessionType,proto3" json:"sessionType"` - ReactionExtensions map[string]*sdkws.KeyValue `protobuf:"bytes,3,rep,name=reactionExtensions,proto3" json:"reactionExtensions" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - ClientMsgID string `protobuf:"bytes,4,opt,name=clientMsgID,proto3" json:"clientMsgID"` - Ex *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=ex,proto3" json:"ex"` - AttachedInfo *wrapperspb.StringValue `protobuf:"bytes,6,opt,name=attachedInfo,proto3" json:"attachedInfo"` - IsReact bool `protobuf:"varint,7,opt,name=isReact,proto3" json:"isReact"` - IsExternalExtensions bool `protobuf:"varint,8,opt,name=isExternalExtensions,proto3" json:"isExternalExtensions"` - MsgFirstModifyTime int64 `protobuf:"varint,9,opt,name=msgFirstModifyTime,proto3" json:"msgFirstModifyTime"` + OperationID string `protobuf:"bytes,1,opt,name=operationID,proto3" json:"operationID"` + OpUserID string `protobuf:"bytes,2,opt,name=opUserID,proto3" json:"opUserID"` + ConversationID string `protobuf:"bytes,3,opt,name=conversationID,proto3" json:"conversationID"` + SessionType int32 `protobuf:"varint,4,opt,name=sessionType,proto3" json:"sessionType"` + ClientMsgID string `protobuf:"bytes,5,opt,name=clientMsgID,proto3" json:"clientMsgID"` + IsExternalExtensions bool `protobuf:"varint,6,opt,name=isExternalExtensions,proto3" json:"isExternalExtensions"` + MsgFirstModifyTime int64 `protobuf:"varint,7,opt,name=msgFirstModifyTime,proto3" json:"msgFirstModifyTime"` + ReactionExtensions []*sdkws.KeyValue `protobuf:"bytes,8,rep,name=reactionExtensions,proto3" json:"reactionExtensions"` } -func (x *ModifyMessageReactionExtensionsReq) Reset() { - *x = ModifyMessageReactionExtensionsReq{} +func (x *DeleteMessagesReactionExtensionsReq) Reset() { + *x = DeleteMessagesReactionExtensionsReq{} if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[22] + mi := &file_msg_msg_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ModifyMessageReactionExtensionsReq) String() string { +func (x *DeleteMessagesReactionExtensionsReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ModifyMessageReactionExtensionsReq) ProtoMessage() {} +func (*DeleteMessagesReactionExtensionsReq) ProtoMessage() {} -func (x *ModifyMessageReactionExtensionsReq) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[22] +func (x *DeleteMessagesReactionExtensionsReq) ProtoReflect() protoreflect.Message { + mi := &file_msg_msg_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1146,107 +1191,92 @@ func (x *ModifyMessageReactionExtensionsReq) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use ModifyMessageReactionExtensionsReq.ProtoReflect.Descriptor instead. -func (*ModifyMessageReactionExtensionsReq) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{22} +// Deprecated: Use DeleteMessagesReactionExtensionsReq.ProtoReflect.Descriptor instead. +func (*DeleteMessagesReactionExtensionsReq) Descriptor() ([]byte, []int) { + return file_msg_msg_proto_rawDescGZIP(), []int{19} } -func (x *ModifyMessageReactionExtensionsReq) GetConversationID() string { +func (x *DeleteMessagesReactionExtensionsReq) GetOperationID() string { if x != nil { - return x.ConversationID + return x.OperationID } return "" } -func (x *ModifyMessageReactionExtensionsReq) GetSessionType() int32 { +func (x *DeleteMessagesReactionExtensionsReq) GetOpUserID() string { if x != nil { - return x.SessionType + return x.OpUserID } - return 0 + return "" } -func (x *ModifyMessageReactionExtensionsReq) GetReactionExtensions() map[string]*sdkws.KeyValue { +func (x *DeleteMessagesReactionExtensionsReq) GetConversationID() string { if x != nil { - return x.ReactionExtensions + return x.ConversationID } - return nil + return "" } -func (x *ModifyMessageReactionExtensionsReq) GetClientMsgID() string { +func (x *DeleteMessagesReactionExtensionsReq) GetSessionType() int32 { if x != nil { - return x.ClientMsgID + return x.SessionType } - return "" + return 0 } -func (x *ModifyMessageReactionExtensionsReq) GetEx() *wrapperspb.StringValue { - if x != nil { - return x.Ex - } - return nil -} - -func (x *ModifyMessageReactionExtensionsReq) GetAttachedInfo() *wrapperspb.StringValue { +func (x *DeleteMessagesReactionExtensionsReq) GetClientMsgID() string { if x != nil { - return x.AttachedInfo + return x.ClientMsgID } - return nil + return "" } -func (x *ModifyMessageReactionExtensionsReq) GetIsReact() bool { +func (x *DeleteMessagesReactionExtensionsReq) GetIsExternalExtensions() bool { if x != nil { - return x.IsReact + return x.IsExternalExtensions } return false } -func (x *ModifyMessageReactionExtensionsReq) GetIsExternalExtensions() bool { +func (x *DeleteMessagesReactionExtensionsReq) GetMsgFirstModifyTime() int64 { if x != nil { - return x.IsExternalExtensions + return x.MsgFirstModifyTime } - return false + return 0 } -func (x *ModifyMessageReactionExtensionsReq) GetMsgFirstModifyTime() int64 { +func (x *DeleteMessagesReactionExtensionsReq) GetReactionExtensions() []*sdkws.KeyValue { if x != nil { - return x.MsgFirstModifyTime + return x.ReactionExtensions } - return 0 + return nil } -type SetMessageReactionExtensionsReq struct { +type DeleteMessagesReactionExtensionsResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"` - SessionType int32 `protobuf:"varint,2,opt,name=sessionType,proto3" json:"sessionType"` - ReactionExtensions map[string]*sdkws.KeyValue `protobuf:"bytes,3,rep,name=reactionExtensions,proto3" json:"reactionExtensions" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - ClientMsgID string `protobuf:"bytes,4,opt,name=clientMsgID,proto3" json:"clientMsgID"` - Ex *wrapperspb.StringValue `protobuf:"bytes,5,opt,name=ex,proto3" json:"ex"` - AttachedInfo *wrapperspb.StringValue `protobuf:"bytes,6,opt,name=attachedInfo,proto3" json:"attachedInfo"` - IsReact bool `protobuf:"varint,7,opt,name=isReact,proto3" json:"isReact"` - IsExternalExtensions bool `protobuf:"varint,8,opt,name=isExternalExtensions,proto3" json:"isExternalExtensions"` - MsgFirstModifyTime int64 `protobuf:"varint,9,opt,name=msgFirstModifyTime,proto3" json:"msgFirstModifyTime"` + Result []*KeyValueResp `protobuf:"bytes,1,rep,name=result,proto3" json:"result"` } -func (x *SetMessageReactionExtensionsReq) Reset() { - *x = SetMessageReactionExtensionsReq{} +func (x *DeleteMessagesReactionExtensionsResp) Reset() { + *x = DeleteMessagesReactionExtensionsResp{} if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[23] + mi := &file_msg_msg_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *SetMessageReactionExtensionsReq) String() string { +func (x *DeleteMessagesReactionExtensionsResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SetMessageReactionExtensionsReq) ProtoMessage() {} +func (*DeleteMessagesReactionExtensionsResp) ProtoMessage() {} -func (x *SetMessageReactionExtensionsReq) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[23] +func (x *DeleteMessagesReactionExtensionsResp) ProtoReflect() protoreflect.Message { + mi := &file_msg_msg_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1257,102 +1287,171 @@ func (x *SetMessageReactionExtensionsReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SetMessageReactionExtensionsReq.ProtoReflect.Descriptor instead. -func (*SetMessageReactionExtensionsReq) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{23} +// Deprecated: Use DeleteMessagesReactionExtensionsResp.ProtoReflect.Descriptor instead. +func (*DeleteMessagesReactionExtensionsResp) Descriptor() ([]byte, []int) { + return file_msg_msg_proto_rawDescGZIP(), []int{20} } -func (x *SetMessageReactionExtensionsReq) GetConversationID() string { +func (x *DeleteMessagesReactionExtensionsResp) GetResult() []*KeyValueResp { if x != nil { - return x.ConversationID + return x.Result } - return "" + return nil } -func (x *SetMessageReactionExtensionsReq) GetSessionType() int32 { - if x != nil { - return x.SessionType +type ExtendMsgResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ExtendMsg *ExtendMsg `protobuf:"bytes,1,opt,name=extendMsg,proto3" json:"extendMsg"` +} + +func (x *ExtendMsgResp) Reset() { + *x = ExtendMsgResp{} + if protoimpl.UnsafeEnabled { + mi := &file_msg_msg_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return 0 } -func (x *SetMessageReactionExtensionsReq) GetReactionExtensions() map[string]*sdkws.KeyValue { +func (x *ExtendMsgResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExtendMsgResp) ProtoMessage() {} + +func (x *ExtendMsgResp) ProtoReflect() protoreflect.Message { + mi := &file_msg_msg_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExtendMsgResp.ProtoReflect.Descriptor instead. +func (*ExtendMsgResp) Descriptor() ([]byte, []int) { + return file_msg_msg_proto_rawDescGZIP(), []int{21} +} + +func (x *ExtendMsgResp) GetExtendMsg() *ExtendMsg { if x != nil { - return x.ReactionExtensions + return x.ExtendMsg } return nil } -func (x *SetMessageReactionExtensionsReq) GetClientMsgID() string { - if x != nil { - return x.ClientMsgID +type ExtendMsg struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ReactionExtensions map[string]*KeyValueResp `protobuf:"bytes,1,rep,name=reactionExtensions,proto3" json:"reactionExtensions" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + ClientMsgID string `protobuf:"bytes,2,opt,name=clientMsgID,proto3" json:"clientMsgID"` + MsgFirstModifyTime int64 `protobuf:"varint,3,opt,name=msgFirstModifyTime,proto3" json:"msgFirstModifyTime"` + AttachedInfo string `protobuf:"bytes,4,opt,name=attachedInfo,proto3" json:"attachedInfo"` + Ex string `protobuf:"bytes,5,opt,name=ex,proto3" json:"ex"` +} + +func (x *ExtendMsg) Reset() { + *x = ExtendMsg{} + if protoimpl.UnsafeEnabled { + mi := &file_msg_msg_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return "" } -func (x *SetMessageReactionExtensionsReq) GetEx() *wrapperspb.StringValue { +func (x *ExtendMsg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExtendMsg) ProtoMessage() {} + +func (x *ExtendMsg) ProtoReflect() protoreflect.Message { + mi := &file_msg_msg_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ExtendMsg.ProtoReflect.Descriptor instead. +func (*ExtendMsg) Descriptor() ([]byte, []int) { + return file_msg_msg_proto_rawDescGZIP(), []int{22} +} + +func (x *ExtendMsg) GetReactionExtensions() map[string]*KeyValueResp { if x != nil { - return x.Ex + return x.ReactionExtensions } return nil } -func (x *SetMessageReactionExtensionsReq) GetAttachedInfo() *wrapperspb.StringValue { +func (x *ExtendMsg) GetClientMsgID() string { if x != nil { - return x.AttachedInfo + return x.ClientMsgID } - return nil + return "" } -func (x *SetMessageReactionExtensionsReq) GetIsReact() bool { +func (x *ExtendMsg) GetMsgFirstModifyTime() int64 { if x != nil { - return x.IsReact + return x.MsgFirstModifyTime } - return false + return 0 } -func (x *SetMessageReactionExtensionsReq) GetIsExternalExtensions() bool { +func (x *ExtendMsg) GetAttachedInfo() string { if x != nil { - return x.IsExternalExtensions + return x.AttachedInfo } - return false + return "" } -func (x *SetMessageReactionExtensionsReq) GetMsgFirstModifyTime() int64 { +func (x *ExtendMsg) GetEx() string { if x != nil { - return x.MsgFirstModifyTime + return x.Ex } - return 0 + return "" } -type SetMessageReactionExtensionsResp struct { +type KeyValueResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ClientMsgID string `protobuf:"bytes,1,opt,name=clientMsgID,proto3" json:"clientMsgID"` - MsgFirstModifyTime int64 `protobuf:"varint,2,opt,name=msgFirstModifyTime,proto3" json:"msgFirstModifyTime"` - IsReact bool `protobuf:"varint,3,opt,name=isReact,proto3" json:"isReact"` - Result []*KeyValueResp `protobuf:"bytes,4,rep,name=result,proto3" json:"result"` + KeyValue *sdkws.KeyValue `protobuf:"bytes,1,opt,name=keyValue,proto3" json:"keyValue"` + ErrCode int32 `protobuf:"varint,2,opt,name=errCode,proto3" json:"errCode"` + ErrMsg string `protobuf:"bytes,3,opt,name=errMsg,proto3" json:"errMsg"` } -func (x *SetMessageReactionExtensionsResp) Reset() { - *x = SetMessageReactionExtensionsResp{} +func (x *KeyValueResp) Reset() { + *x = KeyValueResp{} if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[24] + mi := &file_msg_msg_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *SetMessageReactionExtensionsResp) String() string { +func (x *KeyValueResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SetMessageReactionExtensionsResp) ProtoMessage() {} +func (*KeyValueResp) ProtoMessage() {} -func (x *SetMessageReactionExtensionsResp) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[24] +func (x *KeyValueResp) ProtoReflect() protoreflect.Message { + mi := &file_msg_msg_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1363,67 +1462,58 @@ func (x *SetMessageReactionExtensionsResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SetMessageReactionExtensionsResp.ProtoReflect.Descriptor instead. -func (*SetMessageReactionExtensionsResp) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{24} +// Deprecated: Use KeyValueResp.ProtoReflect.Descriptor instead. +func (*KeyValueResp) Descriptor() ([]byte, []int) { + return file_msg_msg_proto_rawDescGZIP(), []int{23} } -func (x *SetMessageReactionExtensionsResp) GetClientMsgID() string { +func (x *KeyValueResp) GetKeyValue() *sdkws.KeyValue { if x != nil { - return x.ClientMsgID + return x.KeyValue } - return "" + return nil } -func (x *SetMessageReactionExtensionsResp) GetMsgFirstModifyTime() int64 { +func (x *KeyValueResp) GetErrCode() int32 { if x != nil { - return x.MsgFirstModifyTime + return x.ErrCode } return 0 } -func (x *SetMessageReactionExtensionsResp) GetIsReact() bool { - if x != nil { - return x.IsReact - } - return false -} - -func (x *SetMessageReactionExtensionsResp) GetResult() []*KeyValueResp { +func (x *KeyValueResp) GetErrMsg() string { if x != nil { - return x.Result + return x.ErrMsg } - return nil + return "" } -type GetMessagesReactionExtensionsReq struct { +type MsgDataToModifyByMQ struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"` - SessionType int32 `protobuf:"varint,2,opt,name=sessionType,proto3" json:"sessionType"` - MessageReactionKeys []*GetMessagesReactionExtensionsReq_MessageReactionKey `protobuf:"bytes,3,rep,name=messageReactionKeys,proto3" json:"messageReactionKeys"` - TypeKeys []string `protobuf:"bytes,4,rep,name=TypeKeys,proto3" json:"TypeKeys"` + Messages []*sdkws.MsgData `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages"` + ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID"` } -func (x *GetMessagesReactionExtensionsReq) Reset() { - *x = GetMessagesReactionExtensionsReq{} +func (x *MsgDataToModifyByMQ) Reset() { + *x = MsgDataToModifyByMQ{} if protoimpl.UnsafeEnabled { - mi := &file_msg_msg_proto_msgTypes[25] + mi := &file_msg_msg_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GetMessagesReactionExtensionsReq) String() string { +func (x *MsgDataToModifyByMQ) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetMessagesReactionExtensionsReq) ProtoMessage() {} +func (*MsgDataToModifyByMQ) ProtoMessage() {} -func (x *GetMessagesReactionExtensionsReq) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[25] +func (x *MsgDataToModifyByMQ) ProtoReflect() protoreflect.Message { + mi := &file_msg_msg_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1434,49 +1524,71 @@ func (x *GetMessagesReactionExtensionsReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetMessagesReactionExtensionsReq.ProtoReflect.Descriptor instead. -func (*GetMessagesReactionExtensionsReq) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{25} +// Deprecated: Use MsgDataToModifyByMQ.ProtoReflect.Descriptor instead. +func (*MsgDataToModifyByMQ) Descriptor() ([]byte, []int) { + return file_msg_msg_proto_rawDescGZIP(), []int{24} } -func (x *GetMessagesReactionExtensionsReq) GetConversationID() string { +func (x *MsgDataToModifyByMQ) GetMessages() []*sdkws.MsgData { if x != nil { - return x.ConversationID + return x.Messages } - return "" + return nil } -func (x *GetMessagesReactionExtensionsReq) GetSessionType() int32 { +func (x *MsgDataToModifyByMQ) GetConversationID() string { if x != nil { - return x.SessionType + return x.ConversationID } - return 0 + return "" } -func (x *GetMessagesReactionExtensionsReq) GetMessageReactionKeys() []*GetMessagesReactionExtensionsReq_MessageReactionKey { - if x != nil { - return x.MessageReactionKeys +type DelMsgsReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DelMsgsReq) Reset() { + *x = DelMsgsReq{} + if protoimpl.UnsafeEnabled { + mi := &file_msg_msg_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return nil } -func (x *GetMessagesReactionExtensionsReq) GetTypeKeys() []string { - if x != nil { - return x.TypeKeys +func (x *DelMsgsReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DelMsgsReq) ProtoMessage() {} + +func (x *DelMsgsReq) ProtoReflect() protoreflect.Message { + mi := &file_msg_msg_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return nil + return mi.MessageOf(x) +} + +// Deprecated: Use DelMsgsReq.ProtoReflect.Descriptor instead. +func (*DelMsgsReq) Descriptor() ([]byte, []int) { + return file_msg_msg_proto_rawDescGZIP(), []int{25} } -type GetMessagesReactionExtensionsResp struct { +type DelMsgsResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - SingleMessageResult []*SingleMessageExtensionResult `protobuf:"bytes,1,rep,name=singleMessageResult,proto3" json:"singleMessageResult"` } -func (x *GetMessagesReactionExtensionsResp) Reset() { - *x = GetMessagesReactionExtensionsResp{} +func (x *DelMsgsResp) Reset() { + *x = DelMsgsResp{} if protoimpl.UnsafeEnabled { mi := &file_msg_msg_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1484,13 +1596,13 @@ func (x *GetMessagesReactionExtensionsResp) Reset() { } } -func (x *GetMessagesReactionExtensionsResp) String() string { +func (x *DelMsgsResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetMessagesReactionExtensionsResp) ProtoMessage() {} +func (*DelMsgsResp) ProtoMessage() {} -func (x *GetMessagesReactionExtensionsResp) ProtoReflect() protoreflect.Message { +func (x *DelMsgsResp) ProtoReflect() protoreflect.Message { mi := &file_msg_msg_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1502,29 +1614,24 @@ func (x *GetMessagesReactionExtensionsResp) ProtoReflect() protoreflect.Message return mi.MessageOf(x) } -// Deprecated: Use GetMessagesReactionExtensionsResp.ProtoReflect.Descriptor instead. -func (*GetMessagesReactionExtensionsResp) Descriptor() ([]byte, []int) { +// Deprecated: Use DelMsgsResp.ProtoReflect.Descriptor instead. +func (*DelMsgsResp) Descriptor() ([]byte, []int) { return file_msg_msg_proto_rawDescGZIP(), []int{26} } -func (x *GetMessagesReactionExtensionsResp) GetSingleMessageResult() []*SingleMessageExtensionResult { - if x != nil { - return x.SingleMessageResult - } - return nil -} - -type SingleMessageExtensionResult struct { +type RevokeMsgReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ReactionExtensions map[string]*sdkws.KeyValue `protobuf:"bytes,1,rep,name=reactionExtensions,proto3" json:"reactionExtensions" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - ClientMsgID string `protobuf:"bytes,2,opt,name=clientMsgID,proto3" json:"clientMsgID"` + UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` + RecvID string `protobuf:"bytes,2,opt,name=recvID,proto3" json:"recvID"` + GroupID string `protobuf:"bytes,3,opt,name=groupID,proto3" json:"groupID"` + Seq int64 `protobuf:"varint,4,opt,name=seq,proto3" json:"seq"` } -func (x *SingleMessageExtensionResult) Reset() { - *x = SingleMessageExtensionResult{} +func (x *RevokeMsgReq) Reset() { + *x = RevokeMsgReq{} if protoimpl.UnsafeEnabled { mi := &file_msg_msg_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1532,13 +1639,13 @@ func (x *SingleMessageExtensionResult) Reset() { } } -func (x *SingleMessageExtensionResult) String() string { +func (x *RevokeMsgReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SingleMessageExtensionResult) ProtoMessage() {} +func (*RevokeMsgReq) ProtoMessage() {} -func (x *SingleMessageExtensionResult) ProtoReflect() protoreflect.Message { +func (x *RevokeMsgReq) ProtoReflect() protoreflect.Message { mi := &file_msg_msg_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1550,36 +1657,47 @@ func (x *SingleMessageExtensionResult) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SingleMessageExtensionResult.ProtoReflect.Descriptor instead. -func (*SingleMessageExtensionResult) Descriptor() ([]byte, []int) { +// Deprecated: Use RevokeMsgReq.ProtoReflect.Descriptor instead. +func (*RevokeMsgReq) Descriptor() ([]byte, []int) { return file_msg_msg_proto_rawDescGZIP(), []int{27} } -func (x *SingleMessageExtensionResult) GetReactionExtensions() map[string]*sdkws.KeyValue { +func (x *RevokeMsgReq) GetUserID() string { if x != nil { - return x.ReactionExtensions + return x.UserID } - return nil + return "" } -func (x *SingleMessageExtensionResult) GetClientMsgID() string { +func (x *RevokeMsgReq) GetRecvID() string { if x != nil { - return x.ClientMsgID + return x.RecvID } return "" } -type ModifyMessageReactionExtensionsResp struct { +func (x *RevokeMsgReq) GetGroupID() string { + if x != nil { + return x.GroupID + } + return "" +} + +func (x *RevokeMsgReq) GetSeq() int64 { + if x != nil { + return x.Seq + } + return 0 +} + +type RevokeMsgResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - SuccessList []*ExtendMsgResp `protobuf:"bytes,1,rep,name=successList,proto3" json:"successList"` - FailedList []*ExtendMsgResp `protobuf:"bytes,2,rep,name=failedList,proto3" json:"failedList"` } -func (x *ModifyMessageReactionExtensionsResp) Reset() { - *x = ModifyMessageReactionExtensionsResp{} +func (x *RevokeMsgResp) Reset() { + *x = RevokeMsgResp{} if protoimpl.UnsafeEnabled { mi := &file_msg_msg_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1587,13 +1705,13 @@ func (x *ModifyMessageReactionExtensionsResp) Reset() { } } -func (x *ModifyMessageReactionExtensionsResp) String() string { +func (x *RevokeMsgResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ModifyMessageReactionExtensionsResp) ProtoMessage() {} +func (*RevokeMsgResp) ProtoMessage() {} -func (x *ModifyMessageReactionExtensionsResp) ProtoReflect() protoreflect.Message { +func (x *RevokeMsgResp) ProtoReflect() protoreflect.Message { mi := &file_msg_msg_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1605,42 +1723,22 @@ func (x *ModifyMessageReactionExtensionsResp) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use ModifyMessageReactionExtensionsResp.ProtoReflect.Descriptor instead. -func (*ModifyMessageReactionExtensionsResp) Descriptor() ([]byte, []int) { +// Deprecated: Use RevokeMsgResp.ProtoReflect.Descriptor instead. +func (*RevokeMsgResp) Descriptor() ([]byte, []int) { return file_msg_msg_proto_rawDescGZIP(), []int{28} } -func (x *ModifyMessageReactionExtensionsResp) GetSuccessList() []*ExtendMsgResp { - if x != nil { - return x.SuccessList - } - return nil -} - -func (x *ModifyMessageReactionExtensionsResp) GetFailedList() []*ExtendMsgResp { - if x != nil { - return x.FailedList - } - return nil -} - -type DeleteMessagesReactionExtensionsReq struct { +type ClearConversationsMsgReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - OperationID string `protobuf:"bytes,1,opt,name=operationID,proto3" json:"operationID"` - OpUserID string `protobuf:"bytes,2,opt,name=opUserID,proto3" json:"opUserID"` - ConversationID string `protobuf:"bytes,3,opt,name=conversationID,proto3" json:"conversationID"` - SessionType int32 `protobuf:"varint,4,opt,name=sessionType,proto3" json:"sessionType"` - ClientMsgID string `protobuf:"bytes,5,opt,name=clientMsgID,proto3" json:"clientMsgID"` - IsExternalExtensions bool `protobuf:"varint,6,opt,name=isExternalExtensions,proto3" json:"isExternalExtensions"` - MsgFirstModifyTime int64 `protobuf:"varint,7,opt,name=msgFirstModifyTime,proto3" json:"msgFirstModifyTime"` - ReactionExtensions []*sdkws.KeyValue `protobuf:"bytes,8,rep,name=reactionExtensions,proto3" json:"reactionExtensions"` + ConversationIDs []string `protobuf:"bytes,1,rep,name=conversationIDs,proto3" json:"conversationIDs"` + UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"` } -func (x *DeleteMessagesReactionExtensionsReq) Reset() { - *x = DeleteMessagesReactionExtensionsReq{} +func (x *ClearConversationsMsgReq) Reset() { + *x = ClearConversationsMsgReq{} if protoimpl.UnsafeEnabled { mi := &file_msg_msg_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1648,13 +1746,13 @@ func (x *DeleteMessagesReactionExtensionsReq) Reset() { } } -func (x *DeleteMessagesReactionExtensionsReq) String() string { +func (x *ClearConversationsMsgReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DeleteMessagesReactionExtensionsReq) ProtoMessage() {} +func (*ClearConversationsMsgReq) ProtoMessage() {} -func (x *DeleteMessagesReactionExtensionsReq) ProtoReflect() protoreflect.Message { +func (x *ClearConversationsMsgReq) ProtoReflect() protoreflect.Message { mi := &file_msg_msg_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1666,77 +1764,33 @@ func (x *DeleteMessagesReactionExtensionsReq) ProtoReflect() protoreflect.Messag return mi.MessageOf(x) } -// Deprecated: Use DeleteMessagesReactionExtensionsReq.ProtoReflect.Descriptor instead. -func (*DeleteMessagesReactionExtensionsReq) Descriptor() ([]byte, []int) { +// Deprecated: Use ClearConversationsMsgReq.ProtoReflect.Descriptor instead. +func (*ClearConversationsMsgReq) Descriptor() ([]byte, []int) { return file_msg_msg_proto_rawDescGZIP(), []int{29} } -func (x *DeleteMessagesReactionExtensionsReq) GetOperationID() string { - if x != nil { - return x.OperationID - } - return "" -} - -func (x *DeleteMessagesReactionExtensionsReq) GetOpUserID() string { - if x != nil { - return x.OpUserID - } - return "" -} - -func (x *DeleteMessagesReactionExtensionsReq) GetConversationID() string { - if x != nil { - return x.ConversationID - } - return "" -} - -func (x *DeleteMessagesReactionExtensionsReq) GetSessionType() int32 { +func (x *ClearConversationsMsgReq) GetConversationIDs() []string { if x != nil { - return x.SessionType + return x.ConversationIDs } - return 0 + return nil } -func (x *DeleteMessagesReactionExtensionsReq) GetClientMsgID() string { +func (x *ClearConversationsMsgReq) GetUserID() string { if x != nil { - return x.ClientMsgID + return x.UserID } return "" } -func (x *DeleteMessagesReactionExtensionsReq) GetIsExternalExtensions() bool { - if x != nil { - return x.IsExternalExtensions - } - return false -} - -func (x *DeleteMessagesReactionExtensionsReq) GetMsgFirstModifyTime() int64 { - if x != nil { - return x.MsgFirstModifyTime - } - return 0 -} - -func (x *DeleteMessagesReactionExtensionsReq) GetReactionExtensions() []*sdkws.KeyValue { - if x != nil { - return x.ReactionExtensions - } - return nil -} - -type DeleteMessagesReactionExtensionsResp struct { +type ClearConversationsMsgResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Result []*KeyValueResp `protobuf:"bytes,1,rep,name=result,proto3" json:"result"` } -func (x *DeleteMessagesReactionExtensionsResp) Reset() { - *x = DeleteMessagesReactionExtensionsResp{} +func (x *ClearConversationsMsgResp) Reset() { + *x = ClearConversationsMsgResp{} if protoimpl.UnsafeEnabled { mi := &file_msg_msg_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1744,13 +1798,13 @@ func (x *DeleteMessagesReactionExtensionsResp) Reset() { } } -func (x *DeleteMessagesReactionExtensionsResp) String() string { +func (x *ClearConversationsMsgResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DeleteMessagesReactionExtensionsResp) ProtoMessage() {} +func (*ClearConversationsMsgResp) ProtoMessage() {} -func (x *DeleteMessagesReactionExtensionsResp) ProtoReflect() protoreflect.Message { +func (x *ClearConversationsMsgResp) ProtoReflect() protoreflect.Message { mi := &file_msg_msg_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1762,28 +1816,21 @@ func (x *DeleteMessagesReactionExtensionsResp) ProtoReflect() protoreflect.Messa return mi.MessageOf(x) } -// Deprecated: Use DeleteMessagesReactionExtensionsResp.ProtoReflect.Descriptor instead. -func (*DeleteMessagesReactionExtensionsResp) Descriptor() ([]byte, []int) { +// Deprecated: Use ClearConversationsMsgResp.ProtoReflect.Descriptor instead. +func (*ClearConversationsMsgResp) Descriptor() ([]byte, []int) { return file_msg_msg_proto_rawDescGZIP(), []int{30} } -func (x *DeleteMessagesReactionExtensionsResp) GetResult() []*KeyValueResp { - if x != nil { - return x.Result - } - return nil -} - -type ExtendMsgResp struct { +type UserClearAllMsgReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ExtendMsg *ExtendMsg `protobuf:"bytes,1,opt,name=extendMsg,proto3" json:"extendMsg"` + UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` } -func (x *ExtendMsgResp) Reset() { - *x = ExtendMsgResp{} +func (x *UserClearAllMsgReq) Reset() { + *x = UserClearAllMsgReq{} if protoimpl.UnsafeEnabled { mi := &file_msg_msg_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1791,13 +1838,13 @@ func (x *ExtendMsgResp) Reset() { } } -func (x *ExtendMsgResp) String() string { +func (x *UserClearAllMsgReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ExtendMsgResp) ProtoMessage() {} +func (*UserClearAllMsgReq) ProtoMessage() {} -func (x *ExtendMsgResp) ProtoReflect() protoreflect.Message { +func (x *UserClearAllMsgReq) ProtoReflect() protoreflect.Message { mi := &file_msg_msg_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1809,32 +1856,26 @@ func (x *ExtendMsgResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ExtendMsgResp.ProtoReflect.Descriptor instead. -func (*ExtendMsgResp) Descriptor() ([]byte, []int) { +// Deprecated: Use UserClearAllMsgReq.ProtoReflect.Descriptor instead. +func (*UserClearAllMsgReq) Descriptor() ([]byte, []int) { return file_msg_msg_proto_rawDescGZIP(), []int{31} } -func (x *ExtendMsgResp) GetExtendMsg() *ExtendMsg { +func (x *UserClearAllMsgReq) GetUserID() string { if x != nil { - return x.ExtendMsg + return x.UserID } - return nil + return "" } -type ExtendMsg struct { +type UserClearAllMsgResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - ReactionExtensions map[string]*KeyValueResp `protobuf:"bytes,1,rep,name=reactionExtensions,proto3" json:"reactionExtensions" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - ClientMsgID string `protobuf:"bytes,2,opt,name=clientMsgID,proto3" json:"clientMsgID"` - MsgFirstModifyTime int64 `protobuf:"varint,3,opt,name=msgFirstModifyTime,proto3" json:"msgFirstModifyTime"` - AttachedInfo string `protobuf:"bytes,4,opt,name=attachedInfo,proto3" json:"attachedInfo"` - Ex string `protobuf:"bytes,5,opt,name=ex,proto3" json:"ex"` } -func (x *ExtendMsg) Reset() { - *x = ExtendMsg{} +func (x *UserClearAllMsgResp) Reset() { + *x = UserClearAllMsgResp{} if protoimpl.UnsafeEnabled { mi := &file_msg_msg_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1842,76 +1883,41 @@ func (x *ExtendMsg) Reset() { } } -func (x *ExtendMsg) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExtendMsg) ProtoMessage() {} - -func (x *ExtendMsg) ProtoReflect() protoreflect.Message { - mi := &file_msg_msg_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ExtendMsg.ProtoReflect.Descriptor instead. -func (*ExtendMsg) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{32} -} - -func (x *ExtendMsg) GetReactionExtensions() map[string]*KeyValueResp { - if x != nil { - return x.ReactionExtensions - } - return nil -} - -func (x *ExtendMsg) GetClientMsgID() string { - if x != nil { - return x.ClientMsgID - } - return "" -} - -func (x *ExtendMsg) GetMsgFirstModifyTime() int64 { - if x != nil { - return x.MsgFirstModifyTime - } - return 0 +func (x *UserClearAllMsgResp) String() string { + return protoimpl.X.MessageStringOf(x) } -func (x *ExtendMsg) GetAttachedInfo() string { - if x != nil { - return x.AttachedInfo +func (*UserClearAllMsgResp) ProtoMessage() {} + +func (x *UserClearAllMsgResp) ProtoReflect() protoreflect.Message { + mi := &file_msg_msg_proto_msgTypes[32] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return "" + return mi.MessageOf(x) } -func (x *ExtendMsg) GetEx() string { - if x != nil { - return x.Ex - } - return "" +// Deprecated: Use UserClearAllMsgResp.ProtoReflect.Descriptor instead. +func (*UserClearAllMsgResp) Descriptor() ([]byte, []int) { + return file_msg_msg_proto_rawDescGZIP(), []int{32} } -type KeyValueResp struct { +type DeleteMsgsReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - KeyValue *sdkws.KeyValue `protobuf:"bytes,1,opt,name=keyValue,proto3" json:"keyValue"` - ErrCode int32 `protobuf:"varint,2,opt,name=errCode,proto3" json:"errCode"` - ErrMsg string `protobuf:"bytes,3,opt,name=errMsg,proto3" json:"errMsg"` + ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"` + Seqs []int64 `protobuf:"varint,2,rep,packed,name=seqs,proto3" json:"seqs"` + UserID string `protobuf:"bytes,3,opt,name=userID,proto3" json:"userID"` } -func (x *KeyValueResp) Reset() { - *x = KeyValueResp{} +func (x *DeleteMsgsReq) Reset() { + *x = DeleteMsgsReq{} if protoimpl.UnsafeEnabled { mi := &file_msg_msg_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1919,13 +1925,13 @@ func (x *KeyValueResp) Reset() { } } -func (x *KeyValueResp) String() string { +func (x *DeleteMsgsReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*KeyValueResp) ProtoMessage() {} +func (*DeleteMsgsReq) ProtoMessage() {} -func (x *KeyValueResp) ProtoReflect() protoreflect.Message { +func (x *DeleteMsgsReq) ProtoReflect() protoreflect.Message { mi := &file_msg_msg_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1937,43 +1943,40 @@ func (x *KeyValueResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use KeyValueResp.ProtoReflect.Descriptor instead. -func (*KeyValueResp) Descriptor() ([]byte, []int) { +// Deprecated: Use DeleteMsgsReq.ProtoReflect.Descriptor instead. +func (*DeleteMsgsReq) Descriptor() ([]byte, []int) { return file_msg_msg_proto_rawDescGZIP(), []int{33} } -func (x *KeyValueResp) GetKeyValue() *sdkws.KeyValue { +func (x *DeleteMsgsReq) GetConversationID() string { if x != nil { - return x.KeyValue + return x.ConversationID } - return nil + return "" } -func (x *KeyValueResp) GetErrCode() int32 { +func (x *DeleteMsgsReq) GetSeqs() []int64 { if x != nil { - return x.ErrCode + return x.Seqs } - return 0 + return nil } -func (x *KeyValueResp) GetErrMsg() string { +func (x *DeleteMsgsReq) GetUserID() string { if x != nil { - return x.ErrMsg + return x.UserID } return "" } -type MsgDataToModifyByMQ struct { +type DeleteMsgsResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Messages []*sdkws.MsgData `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages"` - ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID"` } -func (x *MsgDataToModifyByMQ) Reset() { - *x = MsgDataToModifyByMQ{} +func (x *DeleteMsgsResp) Reset() { + *x = DeleteMsgsResp{} if protoimpl.UnsafeEnabled { mi := &file_msg_msg_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1981,13 +1984,13 @@ func (x *MsgDataToModifyByMQ) Reset() { } } -func (x *MsgDataToModifyByMQ) String() string { +func (x *DeleteMsgsResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgDataToModifyByMQ) ProtoMessage() {} +func (*DeleteMsgsResp) ProtoMessage() {} -func (x *MsgDataToModifyByMQ) ProtoReflect() protoreflect.Message { +func (x *DeleteMsgsResp) ProtoReflect() protoreflect.Message { mi := &file_msg_msg_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1999,33 +2002,22 @@ func (x *MsgDataToModifyByMQ) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use MsgDataToModifyByMQ.ProtoReflect.Descriptor instead. -func (*MsgDataToModifyByMQ) Descriptor() ([]byte, []int) { +// Deprecated: Use DeleteMsgsResp.ProtoReflect.Descriptor instead. +func (*DeleteMsgsResp) Descriptor() ([]byte, []int) { return file_msg_msg_proto_rawDescGZIP(), []int{34} } -func (x *MsgDataToModifyByMQ) GetMessages() []*sdkws.MsgData { - if x != nil { - return x.Messages - } - return nil -} - -func (x *MsgDataToModifyByMQ) GetConversationID() string { - if x != nil { - return x.ConversationID - } - return "" -} - -type DelMsgsReq struct { +type DeleteMsgPhysicalReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + ConversationIDs []string `protobuf:"bytes,1,rep,name=conversationIDs,proto3" json:"conversationIDs"` + RemainTime int64 `protobuf:"varint,2,opt,name=remainTime,proto3" json:"remainTime"` } -func (x *DelMsgsReq) Reset() { - *x = DelMsgsReq{} +func (x *DeleteMsgPhysicalReq) Reset() { + *x = DeleteMsgPhysicalReq{} if protoimpl.UnsafeEnabled { mi := &file_msg_msg_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2033,13 +2025,13 @@ func (x *DelMsgsReq) Reset() { } } -func (x *DelMsgsReq) String() string { +func (x *DeleteMsgPhysicalReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DelMsgsReq) ProtoMessage() {} +func (*DeleteMsgPhysicalReq) ProtoMessage() {} -func (x *DelMsgsReq) ProtoReflect() protoreflect.Message { +func (x *DeleteMsgPhysicalReq) ProtoReflect() protoreflect.Message { mi := &file_msg_msg_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2051,19 +2043,33 @@ func (x *DelMsgsReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DelMsgsReq.ProtoReflect.Descriptor instead. -func (*DelMsgsReq) Descriptor() ([]byte, []int) { +// Deprecated: Use DeleteMsgPhysicalReq.ProtoReflect.Descriptor instead. +func (*DeleteMsgPhysicalReq) Descriptor() ([]byte, []int) { return file_msg_msg_proto_rawDescGZIP(), []int{35} } -type DelMsgsResp struct { +func (x *DeleteMsgPhysicalReq) GetConversationIDs() []string { + if x != nil { + return x.ConversationIDs + } + return nil +} + +func (x *DeleteMsgPhysicalReq) GetRemainTime() int64 { + if x != nil { + return x.RemainTime + } + return 0 +} + +type DeleteMsgPhysicalResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *DelMsgsResp) Reset() { - *x = DelMsgsResp{} +func (x *DeleteMsgPhysicalResp) Reset() { + *x = DeleteMsgPhysicalResp{} if protoimpl.UnsafeEnabled { mi := &file_msg_msg_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2071,13 +2077,13 @@ func (x *DelMsgsResp) Reset() { } } -func (x *DelMsgsResp) String() string { +func (x *DeleteMsgPhysicalResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DelMsgsResp) ProtoMessage() {} +func (*DeleteMsgPhysicalResp) ProtoMessage() {} -func (x *DelMsgsResp) ProtoReflect() protoreflect.Message { +func (x *DeleteMsgPhysicalResp) ProtoReflect() protoreflect.Message { mi := &file_msg_msg_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2089,24 +2095,22 @@ func (x *DelMsgsResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DelMsgsResp.ProtoReflect.Descriptor instead. -func (*DelMsgsResp) Descriptor() ([]byte, []int) { +// Deprecated: Use DeleteMsgPhysicalResp.ProtoReflect.Descriptor instead. +func (*DeleteMsgPhysicalResp) Descriptor() ([]byte, []int) { return file_msg_msg_proto_rawDescGZIP(), []int{36} } -type RevokeMsgReq struct { +type DeleteMsgPhysicalBySeqReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID"` - RecvID string `protobuf:"bytes,2,opt,name=recvID,proto3" json:"recvID"` - GroupID string `protobuf:"bytes,3,opt,name=groupID,proto3" json:"groupID"` - Seq int64 `protobuf:"varint,4,opt,name=seq,proto3" json:"seq"` + ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"` + Seqs []int64 `protobuf:"varint,2,rep,packed,name=seqs,proto3" json:"seqs"` } -func (x *RevokeMsgReq) Reset() { - *x = RevokeMsgReq{} +func (x *DeleteMsgPhysicalBySeqReq) Reset() { + *x = DeleteMsgPhysicalBySeqReq{} if protoimpl.UnsafeEnabled { mi := &file_msg_msg_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2114,13 +2118,13 @@ func (x *RevokeMsgReq) Reset() { } } -func (x *RevokeMsgReq) String() string { +func (x *DeleteMsgPhysicalBySeqReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RevokeMsgReq) ProtoMessage() {} +func (*DeleteMsgPhysicalBySeqReq) ProtoMessage() {} -func (x *RevokeMsgReq) ProtoReflect() protoreflect.Message { +func (x *DeleteMsgPhysicalBySeqReq) ProtoReflect() protoreflect.Message { mi := &file_msg_msg_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2132,47 +2136,33 @@ func (x *RevokeMsgReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RevokeMsgReq.ProtoReflect.Descriptor instead. -func (*RevokeMsgReq) Descriptor() ([]byte, []int) { +// Deprecated: Use DeleteMsgPhysicalBySeqReq.ProtoReflect.Descriptor instead. +func (*DeleteMsgPhysicalBySeqReq) Descriptor() ([]byte, []int) { return file_msg_msg_proto_rawDescGZIP(), []int{37} } -func (x *RevokeMsgReq) GetUserID() string { - if x != nil { - return x.UserID - } - return "" -} - -func (x *RevokeMsgReq) GetRecvID() string { - if x != nil { - return x.RecvID - } - return "" -} - -func (x *RevokeMsgReq) GetGroupID() string { +func (x *DeleteMsgPhysicalBySeqReq) GetConversationID() string { if x != nil { - return x.GroupID + return x.ConversationID } return "" } -func (x *RevokeMsgReq) GetSeq() int64 { +func (x *DeleteMsgPhysicalBySeqReq) GetSeqs() []int64 { if x != nil { - return x.Seq + return x.Seqs } - return 0 + return nil } -type RevokeMsgResp struct { +type DeleteMsgPhysicalBySeqResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *RevokeMsgResp) Reset() { - *x = RevokeMsgResp{} +func (x *DeleteMsgPhysicalBySeqResp) Reset() { + *x = DeleteMsgPhysicalBySeqResp{} if protoimpl.UnsafeEnabled { mi := &file_msg_msg_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2180,13 +2170,13 @@ func (x *RevokeMsgResp) Reset() { } } -func (x *RevokeMsgResp) String() string { +func (x *DeleteMsgPhysicalBySeqResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*RevokeMsgResp) ProtoMessage() {} +func (*DeleteMsgPhysicalBySeqResp) ProtoMessage() {} -func (x *RevokeMsgResp) ProtoReflect() protoreflect.Message { +func (x *DeleteMsgPhysicalBySeqResp) ProtoReflect() protoreflect.Message { mi := &file_msg_msg_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2198,8 +2188,8 @@ func (x *RevokeMsgResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use RevokeMsgResp.ProtoReflect.Descriptor instead. -func (*RevokeMsgResp) Descriptor() ([]byte, []int) { +// Deprecated: Use DeleteMsgPhysicalBySeqResp.ProtoReflect.Descriptor instead. +func (*DeleteMsgPhysicalBySeqResp) Descriptor() ([]byte, []int) { return file_msg_msg_proto_rawDescGZIP(), []int{38} } @@ -2241,7 +2231,7 @@ func (x *GetMessagesReactionExtensionsReq_MessageReactionKey) ProtoReflect() pro // Deprecated: Use GetMessagesReactionExtensionsReq_MessageReactionKey.ProtoReflect.Descriptor instead. func (*GetMessagesReactionExtensionsReq_MessageReactionKey) Descriptor() ([]byte, []int) { - return file_msg_msg_proto_rawDescGZIP(), []int{25, 0} + return file_msg_msg_proto_rawDescGZIP(), []int{15, 0} } func (x *GetMessagesReactionExtensionsReq_MessageReactionKey) GetClientMsgID() string { @@ -2310,313 +2300,331 @@ var file_msg_msg_proto_rawDesc = []byte{ 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x25, - 0x0a, 0x0b, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, - 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, - 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x0e, 0x0a, 0x0c, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x4d, 0x73, - 0x67, 0x52, 0x65, 0x73, 0x70, 0x22, 0x5b, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x4d, 0x73, 0x67, 0x4d, - 0x69, 0x6e, 0x53, 0x65, 0x71, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, - 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, - 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x69, - 0x6e, 0x53, 0x65, 0x71, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6d, 0x69, 0x6e, 0x53, - 0x65, 0x71, 0x22, 0x12, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x6e, 0x53, - 0x65, 0x71, 0x52, 0x65, 0x73, 0x70, 0x22, 0x2d, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x53, 0x65, 0x6e, - 0x64, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x16, 0x0a, 0x14, 0x53, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x64, - 0x4d, 0x73, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x15, 0x0a, - 0x13, 0x47, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x65, 0x71, 0x22, 0x2e, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x4d, - 0x73, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x22, 0x47, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x53, 0x75, 0x70, 0x65, 0x72, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, - 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, - 0x72, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x22, 0x16, 0x0a, - 0x14, 0x44, 0x65, 0x6c, 0x53, 0x75, 0x70, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x73, - 0x67, 0x52, 0x65, 0x73, 0x70, 0x22, 0x41, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x53, 0x75, 0x70, 0x65, - 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, - 0x53, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x53, 0x65, 0x71, 0x12, 0x18, - 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x22, 0x4d, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, - 0x75, 0x70, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x35, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, - 0x6d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x22, 0x26, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x57, 0x72, - 0x69, 0x74, 0x65, 0x44, 0x69, 0x66, 0x66, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, - 0x03, 0x53, 0x65, 0x71, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x53, 0x65, 0x71, 0x22, - 0x4c, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x57, 0x72, 0x69, 0x74, 0x65, 0x44, 0x69, 0x66, 0x66, 0x4d, - 0x73, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x35, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x44, 0x61, 0x74, - 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x4d, 0x73, 0x67, - 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x22, 0xed, 0x04, - 0x0a, 0x22, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x2d, + 0x0a, 0x13, 0x53, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x16, 0x0a, + 0x14, 0x53, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x15, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x64, + 0x4d, 0x73, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x22, 0x2e, 0x0a, 0x14, + 0x47, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xed, 0x04, 0x0a, + 0x22, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x71, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x73, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x7c, 0x0a, + 0x12, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, + 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x4d, 0x6f, 0x64, + 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x2e, + 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x12, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x12, 0x32, 0x0a, + 0x02, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, + 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x02, 0x65, + 0x78, 0x12, 0x46, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x49, 0x6e, 0x66, + 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x61, 0x74, 0x74, + 0x61, 0x63, 0x68, 0x65, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x52, + 0x65, 0x61, 0x63, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x52, 0x65, + 0x61, 0x63, 0x74, 0x12, 0x32, 0x0a, 0x14, 0x69, 0x73, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x14, 0x69, 0x73, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x6d, 0x73, 0x67, 0x46, 0x69, + 0x72, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x12, 0x6d, 0x73, 0x67, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4d, 0x6f, 0x64, + 0x69, 0x66, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x63, 0x0a, 0x17, 0x52, 0x65, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xe7, 0x04, 0x0a, + 0x1f, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, + 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x73, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x79, 0x0a, 0x12, 0x72, 0x65, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x12, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, + 0x73, 0x67, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x12, 0x32, 0x0a, 0x02, 0x65, 0x78, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x02, 0x65, 0x78, 0x12, 0x46, 0x0a, 0x0c, 0x61, + 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x52, 0x65, 0x61, 0x63, 0x74, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x52, 0x65, 0x61, 0x63, 0x74, 0x12, 0x32, 0x0a, + 0x14, 0x69, 0x73, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x69, 0x73, 0x45, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x6d, 0x73, 0x67, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4d, 0x6f, 0x64, + 0x69, 0x66, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6d, + 0x73, 0x67, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x54, 0x69, 0x6d, + 0x65, 0x1a, 0x63, 0x0a, 0x17, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x32, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, + 0x77, 0x73, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc6, 0x01, 0x0a, 0x20, 0x53, 0x65, 0x74, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x0b, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x12, 0x2e, 0x0a, + 0x12, 0x6d, 0x73, 0x67, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x54, + 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6d, 0x73, 0x67, 0x46, 0x69, + 0x72, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x69, 0x73, 0x52, 0x65, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, + 0x69, 0x73, 0x52, 0x65, 0x61, 0x63, 0x74, 0x12, 0x36, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, + 0xe9, 0x02, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x7c, - 0x0a, 0x12, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x4d, 0x6f, - 0x64, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x05, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x77, + 0x0a, 0x13, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x4f, 0x70, + 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x47, + 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x2e, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4b, + 0x65, 0x79, 0x52, 0x13, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x54, 0x79, 0x70, 0x65, 0x4b, + 0x65, 0x79, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x54, 0x79, 0x70, 0x65, 0x4b, + 0x65, 0x79, 0x73, 0x1a, 0x66, 0x0a, 0x12, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x12, 0x2e, 0x0a, 0x12, 0x6d, + 0x73, 0x67, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x54, 0x69, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6d, 0x73, 0x67, 0x46, 0x69, 0x72, 0x73, + 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x21, + 0x47, 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x60, 0x0a, 0x13, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, + 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, + 0x67, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x13, + 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x22, 0x9d, 0x02, 0x0a, 0x1c, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x12, 0x76, 0x0a, 0x12, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x46, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, + 0x6d, 0x73, 0x67, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x12, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x20, 0x0a, 0x0b, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x12, 0x32, - 0x0a, 0x02, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x02, - 0x65, 0x78, 0x12, 0x46, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x49, 0x6e, - 0x66, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, - 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x61, 0x74, - 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, - 0x52, 0x65, 0x61, 0x63, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x52, - 0x65, 0x61, 0x63, 0x74, 0x12, 0x32, 0x0a, 0x14, 0x69, 0x73, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x14, 0x69, 0x73, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x6d, 0x73, 0x67, 0x46, - 0x69, 0x72, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6d, 0x73, 0x67, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4d, 0x6f, - 0x64, 0x69, 0x66, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x1a, 0x63, 0x0a, 0x17, 0x52, 0x65, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xe7, 0x04, - 0x0a, 0x1f, 0x53, 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x71, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, - 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x79, 0x0a, 0x12, 0x72, - 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x65, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x1a, 0x63, + 0x0a, 0x17, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x4f, 0x70, 0x65, + 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, + 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0xa9, 0x01, 0x0a, 0x23, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x12, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x4d, 0x73, 0x67, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x12, 0x32, 0x0a, 0x02, 0x65, 0x78, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, - 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x02, 0x65, 0x78, 0x12, 0x46, 0x0a, 0x0c, - 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, - 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x52, 0x65, 0x61, 0x63, 0x74, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x73, 0x52, 0x65, 0x61, 0x63, 0x74, 0x12, 0x32, - 0x0a, 0x14, 0x69, 0x73, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x69, 0x73, - 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x6d, 0x73, 0x67, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4d, 0x6f, - 0x64, 0x69, 0x66, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, - 0x6d, 0x73, 0x67, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x54, 0x69, - 0x6d, 0x65, 0x1a, 0x63, 0x0a, 0x17, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x32, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, - 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, - 0x6b, 0x77, 0x73, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc6, 0x01, 0x0a, 0x20, 0x53, 0x65, 0x74, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x20, 0x0a, 0x0b, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x12, 0x2e, - 0x0a, 0x12, 0x6d, 0x73, 0x67, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, - 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6d, 0x73, 0x67, 0x46, - 0x69, 0x72, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x69, 0x73, 0x52, 0x65, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x07, 0x69, 0x73, 0x52, 0x65, 0x61, 0x63, 0x74, 0x12, 0x36, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, - 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x4b, 0x65, 0x79, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x22, 0xe9, 0x02, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, - 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x65, 0x71, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x41, 0x0a, 0x0b, 0x73, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, + 0x6d, 0x73, 0x67, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x52, 0x0b, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x3f, + 0x0a, 0x0a, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x52, + 0x65, 0x73, 0x70, 0x52, 0x0a, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x22, + 0x81, 0x03, 0x0a, 0x23, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, 0x55, + 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x70, 0x55, + 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x20, 0x0a, - 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x77, 0x0a, 0x13, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, - 0x47, 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, - 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x4b, 0x65, 0x79, 0x52, 0x13, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x54, 0x79, 0x70, 0x65, - 0x4b, 0x65, 0x79, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x54, 0x79, 0x70, 0x65, - 0x4b, 0x65, 0x79, 0x73, 0x1a, 0x66, 0x0a, 0x12, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, - 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x12, 0x2e, 0x0a, 0x12, - 0x6d, 0x73, 0x67, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x54, 0x69, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6d, 0x73, 0x67, 0x46, 0x69, 0x72, - 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x85, 0x01, 0x0a, - 0x21, 0x47, 0x65, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x60, 0x0a, 0x13, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x2e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, - 0x73, 0x67, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, - 0x13, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x22, 0x9d, 0x02, 0x0a, 0x1c, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x76, 0x0a, 0x12, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x46, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x12, 0x72, 0x65, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x20, 0x0a, - 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x1a, - 0x63, 0x0a, 0x17, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, - 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x22, 0xa9, 0x01, 0x0a, 0x23, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x41, 0x0a, 0x0b, - 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x52, 0x65, - 0x73, 0x70, 0x52, 0x0b, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, - 0x3f, 0x0a, 0x0a, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, - 0x52, 0x65, 0x73, 0x70, 0x52, 0x0a, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, - 0x22, 0x81, 0x03, 0x0a, 0x23, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x73, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, - 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x70, - 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x70, - 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, - 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x20, - 0x0a, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, - 0x49, 0x44, 0x12, 0x32, 0x0a, 0x14, 0x69, 0x73, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x14, 0x69, 0x73, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x6d, 0x73, 0x67, 0x46, 0x69, 0x72, - 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x12, 0x6d, 0x73, 0x67, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, - 0x66, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4c, 0x0a, 0x12, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x12, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x5e, 0x0a, 0x24, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x36, 0x0a, 0x06, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, - 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x52, 0x06, 0x72, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x22, 0x4a, 0x0a, 0x0d, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x4d, 0x73, - 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x39, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x4d, - 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, - 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x45, 0x78, 0x74, 0x65, - 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, - 0x22, 0xdd, 0x02, 0x0a, 0x09, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x12, 0x63, - 0x0a, 0x12, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x4f, 0x70, 0x65, - 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x12, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, - 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x4d, 0x73, 0x67, 0x49, 0x44, 0x12, 0x2e, 0x0a, 0x12, 0x6d, 0x73, 0x67, 0x46, 0x69, 0x72, 0x73, - 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x49, + 0x44, 0x12, 0x32, 0x0a, 0x14, 0x69, 0x73, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x14, 0x69, 0x73, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x6d, 0x73, 0x67, 0x46, 0x69, 0x72, 0x73, + 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6d, 0x73, 0x67, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, - 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, - 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x74, 0x74, - 0x61, 0x63, 0x68, 0x65, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x65, 0x78, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x65, 0x78, 0x1a, 0x65, 0x0a, 0x17, 0x52, 0x65, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0x7a, 0x0a, 0x0c, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x38, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x52, 0x08, 0x6b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x72, - 0x72, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x72, 0x72, - 0x43, 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x76, 0x0a, 0x13, - 0x4d, 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x54, 0x6f, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x42, - 0x79, 0x4d, 0x51, 0x12, 0x37, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x61, - 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0e, - 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, + 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4c, 0x0a, 0x12, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x12, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x22, 0x5e, 0x0a, 0x24, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x36, 0x0a, 0x06, 0x72, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x4f, 0x70, + 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x4b, + 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x52, 0x06, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x22, 0x4a, 0x0a, 0x0d, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x39, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x4d, 0x73, + 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x64, 0x4d, 0x73, 0x67, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x22, + 0xdd, 0x02, 0x0a, 0x09, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x12, 0x63, 0x0a, + 0x12, 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x4f, 0x70, 0x65, 0x6e, + 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x45, 0x78, 0x74, + 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x12, + 0x72, 0x65, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, 0x73, 0x67, 0x49, + 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4d, + 0x73, 0x67, 0x49, 0x44, 0x12, 0x2e, 0x0a, 0x12, 0x6d, 0x73, 0x67, 0x46, 0x69, 0x72, 0x73, 0x74, + 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x12, 0x6d, 0x73, 0x67, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, + 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x61, + 0x63, 0x68, 0x65, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x65, 0x78, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x65, 0x78, 0x1a, 0x65, 0x0a, 0x17, 0x52, 0x65, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x34, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0x7a, 0x0a, 0x0c, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x38, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x08, 0x6b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x72, 0x72, + 0x43, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x65, 0x72, 0x72, 0x43, + 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x76, 0x0a, 0x13, 0x4d, + 0x73, 0x67, 0x44, 0x61, 0x74, 0x61, 0x54, 0x6f, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x42, 0x79, + 0x4d, 0x51, 0x12, 0x37, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x61, 0x74, + 0x61, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x63, + 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x44, 0x22, 0x0c, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x4d, 0x73, 0x67, 0x73, 0x52, 0x65, + 0x71, 0x22, 0x0d, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x4d, 0x73, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x22, 0x6a, 0x0a, 0x0c, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, + 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x76, + 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x63, 0x76, 0x49, 0x44, + 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, + 0x71, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x73, 0x65, 0x71, 0x22, 0x0f, 0x0a, 0x0d, + 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x70, 0x22, 0x5c, 0x0a, + 0x18, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x44, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x1b, 0x0a, 0x19, 0x43, + 0x6c, 0x65, 0x61, 0x72, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x70, 0x22, 0x2c, 0x0a, 0x12, 0x55, 0x73, 0x65, 0x72, + 0x43, 0x6c, 0x65, 0x61, 0x72, 0x41, 0x6c, 0x6c, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x12, 0x16, + 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x15, 0x0a, 0x13, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6c, + 0x65, 0x61, 0x72, 0x41, 0x6c, 0x6c, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x70, 0x22, 0x63, 0x0a, + 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x73, 0x67, 0x73, 0x52, 0x65, 0x71, 0x12, 0x26, + 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x71, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x03, 0x52, 0x04, 0x73, 0x65, 0x71, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, + 0x65, 0x72, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, + 0x49, 0x44, 0x22, 0x10, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x73, 0x67, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x22, 0x60, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x73, + 0x67, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x28, 0x0a, 0x0f, + 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, + 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x72, 0x65, 0x6d, 0x61, + 0x69, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x4d, 0x73, 0x67, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x22, + 0x57, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x73, 0x67, 0x50, 0x68, 0x79, 0x73, + 0x69, 0x63, 0x61, 0x6c, 0x42, 0x79, 0x53, 0x65, 0x71, 0x52, 0x65, 0x71, 0x12, 0x26, 0x0a, 0x0e, + 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x0c, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x4d, 0x73, 0x67, 0x73, 0x52, - 0x65, 0x71, 0x22, 0x0d, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x4d, 0x73, 0x67, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x22, 0x6a, 0x0a, 0x0c, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4d, 0x73, 0x67, 0x52, 0x65, - 0x71, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x63, - 0x76, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x63, 0x76, 0x49, - 0x44, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x12, 0x10, 0x0a, 0x03, 0x73, - 0x65, 0x71, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x73, 0x65, 0x71, 0x22, 0x0f, 0x0a, - 0x0d, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x70, 0x32, 0xc7, - 0x0a, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x50, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x78, - 0x53, 0x65, 0x71, 0x12, 0x20, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x53, - 0x65, 0x71, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, - 0x78, 0x53, 0x65, 0x71, 0x52, 0x65, 0x73, 0x70, 0x12, 0x68, 0x0a, 0x11, 0x50, 0x75, 0x6c, 0x6c, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x79, 0x53, 0x65, 0x71, 0x73, 0x12, 0x28, 0x2e, + 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x71, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x03, 0x52, 0x04, 0x73, 0x65, 0x71, 0x73, 0x22, 0x1c, 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x4d, 0x73, 0x67, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x42, 0x79, 0x53, + 0x65, 0x71, 0x52, 0x65, 0x73, 0x70, 0x32, 0xcf, 0x0c, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x50, + 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x71, 0x12, 0x20, 0x2e, 0x4f, 0x70, + 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, + 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x71, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, - 0x77, 0x73, 0x2e, 0x50, 0x75, 0x6c, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x79, - 0x53, 0x65, 0x71, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x29, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x50, 0x75, 0x6c, - 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x79, 0x53, 0x65, 0x71, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x46, 0x0a, 0x07, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x12, 0x1c, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, - 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x53, - 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x46, 0x0a, 0x07, 0x44, 0x65, - 0x6c, 0x4d, 0x73, 0x67, 0x73, 0x12, 0x1c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x44, 0x65, 0x6c, 0x4d, 0x73, 0x67, 0x73, + 0x77, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x71, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x68, 0x0a, 0x11, 0x50, 0x75, 0x6c, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, + 0x79, 0x53, 0x65, 0x71, 0x73, 0x12, 0x28, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x50, 0x75, 0x6c, 0x6c, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x79, 0x53, 0x65, 0x71, 0x73, 0x52, 0x65, 0x71, 0x1a, + 0x29, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x73, + 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x50, 0x75, 0x6c, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x42, 0x79, 0x53, 0x65, 0x71, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x46, 0x0a, 0x07, 0x53, 0x65, + 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x12, 0x1c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x44, 0x65, 0x6c, 0x4d, 0x73, 0x67, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x61, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x53, 0x75, 0x70, 0x65, 0x72, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x4d, 0x73, 0x67, 0x12, 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x44, 0x65, 0x6c, 0x53, 0x75, 0x70, - 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x26, 0x2e, + 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x70, 0x0a, 0x15, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x43, 0x6f, 0x6e, 0x76, 0x65, + 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x73, 0x67, 0x12, 0x2a, 0x2e, 0x4f, 0x70, + 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x43, + 0x6c, 0x65, 0x61, 0x72, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x2b, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x72, + 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4d, 0x73, 0x67, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x5e, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6c, 0x65, 0x61, + 0x72, 0x41, 0x6c, 0x6c, 0x4d, 0x73, 0x67, 0x12, 0x24, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, + 0x6c, 0x65, 0x61, 0x72, 0x41, 0x6c, 0x6c, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, - 0x2e, 0x44, 0x65, 0x6c, 0x53, 0x75, 0x70, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x73, - 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x49, 0x0a, 0x08, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x4d, 0x73, - 0x67, 0x12, 0x1d, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, - 0x1a, 0x1e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, - 0x6d, 0x73, 0x67, 0x2e, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x70, + 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x41, 0x6c, 0x6c, 0x4d, 0x73, 0x67, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x4f, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x73, + 0x67, 0x73, 0x12, 0x1f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x73, 0x67, 0x73, + 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x73, 0x67, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x73, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, + 0x73, 0x67, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x42, 0x79, 0x53, 0x65, 0x71, 0x12, + 0x2b, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, + 0x73, 0x67, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x73, 0x67, 0x50, 0x68, 0x79, 0x73, + 0x69, 0x63, 0x61, 0x6c, 0x42, 0x79, 0x53, 0x65, 0x71, 0x52, 0x65, 0x71, 0x1a, 0x2c, 0x2e, 0x4f, + 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x73, 0x67, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, + 0x6c, 0x42, 0x79, 0x53, 0x65, 0x71, 0x52, 0x65, 0x73, 0x70, 0x12, 0x64, 0x0a, 0x11, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x73, 0x67, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x12, + 0x26, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, + 0x73, 0x67, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x73, 0x67, 0x50, 0x68, 0x79, 0x73, + 0x69, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x1a, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x4d, 0x73, 0x67, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x12, 0x61, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x4d, @@ -2698,37 +2706,37 @@ var file_msg_msg_proto_goTypes = []interface{}{ (*GetMaxAndMinSeqResp)(nil), // 5: OpenIMServer.msg.GetMaxAndMinSeqResp (*SendMsgReq)(nil), // 6: OpenIMServer.msg.SendMsgReq (*SendMsgResp)(nil), // 7: OpenIMServer.msg.SendMsgResp - (*ClearMsgReq)(nil), // 8: OpenIMServer.msg.ClearMsgReq - (*ClearMsgResp)(nil), // 9: OpenIMServer.msg.ClearMsgResp - (*SetMsgMinSeqReq)(nil), // 10: OpenIMServer.msg.SetMsgMinSeqReq - (*SetMsgMinSeqResp)(nil), // 11: OpenIMServer.msg.SetMsgMinSeqResp - (*SetSendMsgStatusReq)(nil), // 12: OpenIMServer.msg.SetSendMsgStatusReq - (*SetSendMsgStatusResp)(nil), // 13: OpenIMServer.msg.SetSendMsgStatusResp - (*GetSendMsgStatusReq)(nil), // 14: OpenIMServer.msg.GetSendMsgStatusReq - (*GetSendMsgStatusResp)(nil), // 15: OpenIMServer.msg.GetSendMsgStatusResp - (*DelSuperGroupMsgReq)(nil), // 16: OpenIMServer.msg.DelSuperGroupMsgReq - (*DelSuperGroupMsgResp)(nil), // 17: OpenIMServer.msg.DelSuperGroupMsgResp - (*GetSuperGroupMsgReq)(nil), // 18: OpenIMServer.msg.GetSuperGroupMsgReq - (*GetSuperGroupMsgResp)(nil), // 19: OpenIMServer.msg.GetSuperGroupMsgResp - (*GetWriteDiffMsgReq)(nil), // 20: OpenIMServer.msg.GetWriteDiffMsgReq - (*GetWriteDiffMsgResp)(nil), // 21: OpenIMServer.msg.GetWriteDiffMsgResp - (*ModifyMessageReactionExtensionsReq)(nil), // 22: OpenIMServer.msg.ModifyMessageReactionExtensionsReq - (*SetMessageReactionExtensionsReq)(nil), // 23: OpenIMServer.msg.SetMessageReactionExtensionsReq - (*SetMessageReactionExtensionsResp)(nil), // 24: OpenIMServer.msg.SetMessageReactionExtensionsResp - (*GetMessagesReactionExtensionsReq)(nil), // 25: OpenIMServer.msg.GetMessagesReactionExtensionsReq - (*GetMessagesReactionExtensionsResp)(nil), // 26: OpenIMServer.msg.GetMessagesReactionExtensionsResp - (*SingleMessageExtensionResult)(nil), // 27: OpenIMServer.msg.SingleMessageExtensionResult - (*ModifyMessageReactionExtensionsResp)(nil), // 28: OpenIMServer.msg.ModifyMessageReactionExtensionsResp - (*DeleteMessagesReactionExtensionsReq)(nil), // 29: OpenIMServer.msg.DeleteMessagesReactionExtensionsReq - (*DeleteMessagesReactionExtensionsResp)(nil), // 30: OpenIMServer.msg.DeleteMessagesReactionExtensionsResp - (*ExtendMsgResp)(nil), // 31: OpenIMServer.msg.ExtendMsgResp - (*ExtendMsg)(nil), // 32: OpenIMServer.msg.ExtendMsg - (*KeyValueResp)(nil), // 33: OpenIMServer.msg.KeyValueResp - (*MsgDataToModifyByMQ)(nil), // 34: OpenIMServer.msg.MsgDataToModifyByMQ - (*DelMsgsReq)(nil), // 35: OpenIMServer.msg.DelMsgsReq - (*DelMsgsResp)(nil), // 36: OpenIMServer.msg.DelMsgsResp - (*RevokeMsgReq)(nil), // 37: OpenIMServer.msg.RevokeMsgReq - (*RevokeMsgResp)(nil), // 38: OpenIMServer.msg.RevokeMsgResp + (*SetSendMsgStatusReq)(nil), // 8: OpenIMServer.msg.SetSendMsgStatusReq + (*SetSendMsgStatusResp)(nil), // 9: OpenIMServer.msg.SetSendMsgStatusResp + (*GetSendMsgStatusReq)(nil), // 10: OpenIMServer.msg.GetSendMsgStatusReq + (*GetSendMsgStatusResp)(nil), // 11: OpenIMServer.msg.GetSendMsgStatusResp + (*ModifyMessageReactionExtensionsReq)(nil), // 12: OpenIMServer.msg.ModifyMessageReactionExtensionsReq + (*SetMessageReactionExtensionsReq)(nil), // 13: OpenIMServer.msg.SetMessageReactionExtensionsReq + (*SetMessageReactionExtensionsResp)(nil), // 14: OpenIMServer.msg.SetMessageReactionExtensionsResp + (*GetMessagesReactionExtensionsReq)(nil), // 15: OpenIMServer.msg.GetMessagesReactionExtensionsReq + (*GetMessagesReactionExtensionsResp)(nil), // 16: OpenIMServer.msg.GetMessagesReactionExtensionsResp + (*SingleMessageExtensionResult)(nil), // 17: OpenIMServer.msg.SingleMessageExtensionResult + (*ModifyMessageReactionExtensionsResp)(nil), // 18: OpenIMServer.msg.ModifyMessageReactionExtensionsResp + (*DeleteMessagesReactionExtensionsReq)(nil), // 19: OpenIMServer.msg.DeleteMessagesReactionExtensionsReq + (*DeleteMessagesReactionExtensionsResp)(nil), // 20: OpenIMServer.msg.DeleteMessagesReactionExtensionsResp + (*ExtendMsgResp)(nil), // 21: OpenIMServer.msg.ExtendMsgResp + (*ExtendMsg)(nil), // 22: OpenIMServer.msg.ExtendMsg + (*KeyValueResp)(nil), // 23: OpenIMServer.msg.KeyValueResp + (*MsgDataToModifyByMQ)(nil), // 24: OpenIMServer.msg.MsgDataToModifyByMQ + (*DelMsgsReq)(nil), // 25: OpenIMServer.msg.DelMsgsReq + (*DelMsgsResp)(nil), // 26: OpenIMServer.msg.DelMsgsResp + (*RevokeMsgReq)(nil), // 27: OpenIMServer.msg.RevokeMsgReq + (*RevokeMsgResp)(nil), // 28: OpenIMServer.msg.RevokeMsgResp + (*ClearConversationsMsgReq)(nil), // 29: OpenIMServer.msg.ClearConversationsMsgReq + (*ClearConversationsMsgResp)(nil), // 30: OpenIMServer.msg.ClearConversationsMsgResp + (*UserClearAllMsgReq)(nil), // 31: OpenIMServer.msg.UserClearAllMsgReq + (*UserClearAllMsgResp)(nil), // 32: OpenIMServer.msg.UserClearAllMsgResp + (*DeleteMsgsReq)(nil), // 33: OpenIMServer.msg.DeleteMsgsReq + (*DeleteMsgsResp)(nil), // 34: OpenIMServer.msg.DeleteMsgsResp + (*DeleteMsgPhysicalReq)(nil), // 35: OpenIMServer.msg.DeleteMsgPhysicalReq + (*DeleteMsgPhysicalResp)(nil), // 36: OpenIMServer.msg.DeleteMsgPhysicalResp + (*DeleteMsgPhysicalBySeqReq)(nil), // 37: OpenIMServer.msg.DeleteMsgPhysicalBySeqReq + (*DeleteMsgPhysicalBySeqResp)(nil), // 38: OpenIMServer.msg.DeleteMsgPhysicalBySeqResp nil, // 39: OpenIMServer.msg.ModifyMessageReactionExtensionsReq.ReactionExtensionsEntry nil, // 40: OpenIMServer.msg.SetMessageReactionExtensionsReq.ReactionExtensionsEntry (*GetMessagesReactionExtensionsReq_MessageReactionKey)(nil), // 41: OpenIMServer.msg.GetMessagesReactionExtensionsReq.MessageReactionKey @@ -2748,61 +2756,63 @@ var file_msg_msg_proto_depIdxs = []int32{ 44, // 2: OpenIMServer.msg.PushMsgDataToMQ.msgData:type_name -> OpenIMServer.sdkws.MsgData 44, // 3: OpenIMServer.msg.MsgDataToMongoByMQ.msgData:type_name -> OpenIMServer.sdkws.MsgData 44, // 4: OpenIMServer.msg.SendMsgReq.msgData:type_name -> OpenIMServer.sdkws.MsgData - 44, // 5: OpenIMServer.msg.GetSuperGroupMsgResp.msgData:type_name -> OpenIMServer.sdkws.MsgData - 44, // 6: OpenIMServer.msg.GetWriteDiffMsgResp.msgData:type_name -> OpenIMServer.sdkws.MsgData - 39, // 7: OpenIMServer.msg.ModifyMessageReactionExtensionsReq.reactionExtensions:type_name -> OpenIMServer.msg.ModifyMessageReactionExtensionsReq.ReactionExtensionsEntry - 45, // 8: OpenIMServer.msg.ModifyMessageReactionExtensionsReq.ex:type_name -> OpenIMServer.protobuf.StringValue - 45, // 9: OpenIMServer.msg.ModifyMessageReactionExtensionsReq.attachedInfo:type_name -> OpenIMServer.protobuf.StringValue - 40, // 10: OpenIMServer.msg.SetMessageReactionExtensionsReq.reactionExtensions:type_name -> OpenIMServer.msg.SetMessageReactionExtensionsReq.ReactionExtensionsEntry - 45, // 11: OpenIMServer.msg.SetMessageReactionExtensionsReq.ex:type_name -> OpenIMServer.protobuf.StringValue - 45, // 12: OpenIMServer.msg.SetMessageReactionExtensionsReq.attachedInfo:type_name -> OpenIMServer.protobuf.StringValue - 33, // 13: OpenIMServer.msg.SetMessageReactionExtensionsResp.result:type_name -> OpenIMServer.msg.KeyValueResp - 41, // 14: OpenIMServer.msg.GetMessagesReactionExtensionsReq.messageReactionKeys:type_name -> OpenIMServer.msg.GetMessagesReactionExtensionsReq.MessageReactionKey - 27, // 15: OpenIMServer.msg.GetMessagesReactionExtensionsResp.singleMessageResult:type_name -> OpenIMServer.msg.SingleMessageExtensionResult - 42, // 16: OpenIMServer.msg.SingleMessageExtensionResult.reactionExtensions:type_name -> OpenIMServer.msg.SingleMessageExtensionResult.ReactionExtensionsEntry - 31, // 17: OpenIMServer.msg.ModifyMessageReactionExtensionsResp.successList:type_name -> OpenIMServer.msg.ExtendMsgResp - 31, // 18: OpenIMServer.msg.ModifyMessageReactionExtensionsResp.failedList:type_name -> OpenIMServer.msg.ExtendMsgResp - 46, // 19: OpenIMServer.msg.DeleteMessagesReactionExtensionsReq.reactionExtensions:type_name -> OpenIMServer.sdkws.KeyValue - 33, // 20: OpenIMServer.msg.DeleteMessagesReactionExtensionsResp.result:type_name -> OpenIMServer.msg.KeyValueResp - 32, // 21: OpenIMServer.msg.ExtendMsgResp.extendMsg:type_name -> OpenIMServer.msg.ExtendMsg - 43, // 22: OpenIMServer.msg.ExtendMsg.reactionExtensions:type_name -> OpenIMServer.msg.ExtendMsg.ReactionExtensionsEntry - 46, // 23: OpenIMServer.msg.KeyValueResp.keyValue:type_name -> OpenIMServer.sdkws.KeyValue - 44, // 24: OpenIMServer.msg.MsgDataToModifyByMQ.messages:type_name -> OpenIMServer.sdkws.MsgData - 46, // 25: OpenIMServer.msg.ModifyMessageReactionExtensionsReq.ReactionExtensionsEntry.value:type_name -> OpenIMServer.sdkws.KeyValue - 46, // 26: OpenIMServer.msg.SetMessageReactionExtensionsReq.ReactionExtensionsEntry.value:type_name -> OpenIMServer.sdkws.KeyValue - 46, // 27: OpenIMServer.msg.SingleMessageExtensionResult.ReactionExtensionsEntry.value:type_name -> OpenIMServer.sdkws.KeyValue - 33, // 28: OpenIMServer.msg.ExtendMsg.ReactionExtensionsEntry.value:type_name -> OpenIMServer.msg.KeyValueResp - 47, // 29: OpenIMServer.msg.msg.GetMaxSeq:input_type -> OpenIMServer.sdkws.GetMaxSeqReq - 48, // 30: OpenIMServer.msg.msg.PullMessageBySeqs:input_type -> OpenIMServer.sdkws.PullMessageBySeqsReq - 6, // 31: OpenIMServer.msg.msg.SendMsg:input_type -> OpenIMServer.msg.SendMsgReq - 35, // 32: OpenIMServer.msg.msg.DelMsgs:input_type -> OpenIMServer.msg.DelMsgsReq - 16, // 33: OpenIMServer.msg.msg.DelSuperGroupMsg:input_type -> OpenIMServer.msg.DelSuperGroupMsgReq - 8, // 34: OpenIMServer.msg.msg.ClearMsg:input_type -> OpenIMServer.msg.ClearMsgReq - 12, // 35: OpenIMServer.msg.msg.SetSendMsgStatus:input_type -> OpenIMServer.msg.SetSendMsgStatusReq - 14, // 36: OpenIMServer.msg.msg.GetSendMsgStatus:input_type -> OpenIMServer.msg.GetSendMsgStatusReq - 37, // 37: OpenIMServer.msg.msg.RevokeMsg:input_type -> OpenIMServer.msg.RevokeMsgReq - 23, // 38: OpenIMServer.msg.msg.SetMessageReactionExtensions:input_type -> OpenIMServer.msg.SetMessageReactionExtensionsReq - 25, // 39: OpenIMServer.msg.msg.GetMessagesReactionExtensions:input_type -> OpenIMServer.msg.GetMessagesReactionExtensionsReq - 22, // 40: OpenIMServer.msg.msg.AddMessageReactionExtensions:input_type -> OpenIMServer.msg.ModifyMessageReactionExtensionsReq - 29, // 41: OpenIMServer.msg.msg.DeleteMessageReactionExtensions:input_type -> OpenIMServer.msg.DeleteMessagesReactionExtensionsReq + 39, // 5: OpenIMServer.msg.ModifyMessageReactionExtensionsReq.reactionExtensions:type_name -> OpenIMServer.msg.ModifyMessageReactionExtensionsReq.ReactionExtensionsEntry + 45, // 6: OpenIMServer.msg.ModifyMessageReactionExtensionsReq.ex:type_name -> OpenIMServer.protobuf.StringValue + 45, // 7: OpenIMServer.msg.ModifyMessageReactionExtensionsReq.attachedInfo:type_name -> OpenIMServer.protobuf.StringValue + 40, // 8: OpenIMServer.msg.SetMessageReactionExtensionsReq.reactionExtensions:type_name -> OpenIMServer.msg.SetMessageReactionExtensionsReq.ReactionExtensionsEntry + 45, // 9: OpenIMServer.msg.SetMessageReactionExtensionsReq.ex:type_name -> OpenIMServer.protobuf.StringValue + 45, // 10: OpenIMServer.msg.SetMessageReactionExtensionsReq.attachedInfo:type_name -> OpenIMServer.protobuf.StringValue + 23, // 11: OpenIMServer.msg.SetMessageReactionExtensionsResp.result:type_name -> OpenIMServer.msg.KeyValueResp + 41, // 12: OpenIMServer.msg.GetMessagesReactionExtensionsReq.messageReactionKeys:type_name -> OpenIMServer.msg.GetMessagesReactionExtensionsReq.MessageReactionKey + 17, // 13: OpenIMServer.msg.GetMessagesReactionExtensionsResp.singleMessageResult:type_name -> OpenIMServer.msg.SingleMessageExtensionResult + 42, // 14: OpenIMServer.msg.SingleMessageExtensionResult.reactionExtensions:type_name -> OpenIMServer.msg.SingleMessageExtensionResult.ReactionExtensionsEntry + 21, // 15: OpenIMServer.msg.ModifyMessageReactionExtensionsResp.successList:type_name -> OpenIMServer.msg.ExtendMsgResp + 21, // 16: OpenIMServer.msg.ModifyMessageReactionExtensionsResp.failedList:type_name -> OpenIMServer.msg.ExtendMsgResp + 46, // 17: OpenIMServer.msg.DeleteMessagesReactionExtensionsReq.reactionExtensions:type_name -> OpenIMServer.sdkws.KeyValue + 23, // 18: OpenIMServer.msg.DeleteMessagesReactionExtensionsResp.result:type_name -> OpenIMServer.msg.KeyValueResp + 22, // 19: OpenIMServer.msg.ExtendMsgResp.extendMsg:type_name -> OpenIMServer.msg.ExtendMsg + 43, // 20: OpenIMServer.msg.ExtendMsg.reactionExtensions:type_name -> OpenIMServer.msg.ExtendMsg.ReactionExtensionsEntry + 46, // 21: OpenIMServer.msg.KeyValueResp.keyValue:type_name -> OpenIMServer.sdkws.KeyValue + 44, // 22: OpenIMServer.msg.MsgDataToModifyByMQ.messages:type_name -> OpenIMServer.sdkws.MsgData + 46, // 23: OpenIMServer.msg.ModifyMessageReactionExtensionsReq.ReactionExtensionsEntry.value:type_name -> OpenIMServer.sdkws.KeyValue + 46, // 24: OpenIMServer.msg.SetMessageReactionExtensionsReq.ReactionExtensionsEntry.value:type_name -> OpenIMServer.sdkws.KeyValue + 46, // 25: OpenIMServer.msg.SingleMessageExtensionResult.ReactionExtensionsEntry.value:type_name -> OpenIMServer.sdkws.KeyValue + 23, // 26: OpenIMServer.msg.ExtendMsg.ReactionExtensionsEntry.value:type_name -> OpenIMServer.msg.KeyValueResp + 47, // 27: OpenIMServer.msg.msg.GetMaxSeq:input_type -> OpenIMServer.sdkws.GetMaxSeqReq + 48, // 28: OpenIMServer.msg.msg.PullMessageBySeqs:input_type -> OpenIMServer.sdkws.PullMessageBySeqsReq + 6, // 29: OpenIMServer.msg.msg.SendMsg:input_type -> OpenIMServer.msg.SendMsgReq + 29, // 30: OpenIMServer.msg.msg.ClearConversationsMsg:input_type -> OpenIMServer.msg.ClearConversationsMsgReq + 31, // 31: OpenIMServer.msg.msg.UserClearAllMsg:input_type -> OpenIMServer.msg.UserClearAllMsgReq + 33, // 32: OpenIMServer.msg.msg.DeleteMsgs:input_type -> OpenIMServer.msg.DeleteMsgsReq + 37, // 33: OpenIMServer.msg.msg.DeleteMsgPhysicalBySeq:input_type -> OpenIMServer.msg.DeleteMsgPhysicalBySeqReq + 35, // 34: OpenIMServer.msg.msg.DeleteMsgPhysical:input_type -> OpenIMServer.msg.DeleteMsgPhysicalReq + 8, // 35: OpenIMServer.msg.msg.SetSendMsgStatus:input_type -> OpenIMServer.msg.SetSendMsgStatusReq + 10, // 36: OpenIMServer.msg.msg.GetSendMsgStatus:input_type -> OpenIMServer.msg.GetSendMsgStatusReq + 27, // 37: OpenIMServer.msg.msg.RevokeMsg:input_type -> OpenIMServer.msg.RevokeMsgReq + 13, // 38: OpenIMServer.msg.msg.SetMessageReactionExtensions:input_type -> OpenIMServer.msg.SetMessageReactionExtensionsReq + 15, // 39: OpenIMServer.msg.msg.GetMessagesReactionExtensions:input_type -> OpenIMServer.msg.GetMessagesReactionExtensionsReq + 12, // 40: OpenIMServer.msg.msg.AddMessageReactionExtensions:input_type -> OpenIMServer.msg.ModifyMessageReactionExtensionsReq + 19, // 41: OpenIMServer.msg.msg.DeleteMessageReactionExtensions:input_type -> OpenIMServer.msg.DeleteMessagesReactionExtensionsReq 49, // 42: OpenIMServer.msg.msg.GetMaxSeq:output_type -> OpenIMServer.sdkws.GetMaxSeqResp 50, // 43: OpenIMServer.msg.msg.PullMessageBySeqs:output_type -> OpenIMServer.sdkws.PullMessageBySeqsResp 7, // 44: OpenIMServer.msg.msg.SendMsg:output_type -> OpenIMServer.msg.SendMsgResp - 36, // 45: OpenIMServer.msg.msg.DelMsgs:output_type -> OpenIMServer.msg.DelMsgsResp - 17, // 46: OpenIMServer.msg.msg.DelSuperGroupMsg:output_type -> OpenIMServer.msg.DelSuperGroupMsgResp - 9, // 47: OpenIMServer.msg.msg.ClearMsg:output_type -> OpenIMServer.msg.ClearMsgResp - 13, // 48: OpenIMServer.msg.msg.SetSendMsgStatus:output_type -> OpenIMServer.msg.SetSendMsgStatusResp - 15, // 49: OpenIMServer.msg.msg.GetSendMsgStatus:output_type -> OpenIMServer.msg.GetSendMsgStatusResp - 38, // 50: OpenIMServer.msg.msg.RevokeMsg:output_type -> OpenIMServer.msg.RevokeMsgResp - 24, // 51: OpenIMServer.msg.msg.SetMessageReactionExtensions:output_type -> OpenIMServer.msg.SetMessageReactionExtensionsResp - 26, // 52: OpenIMServer.msg.msg.GetMessagesReactionExtensions:output_type -> OpenIMServer.msg.GetMessagesReactionExtensionsResp - 28, // 53: OpenIMServer.msg.msg.AddMessageReactionExtensions:output_type -> OpenIMServer.msg.ModifyMessageReactionExtensionsResp - 30, // 54: OpenIMServer.msg.msg.DeleteMessageReactionExtensions:output_type -> OpenIMServer.msg.DeleteMessagesReactionExtensionsResp - 42, // [42:55] is the sub-list for method output_type - 29, // [29:42] is the sub-list for method input_type - 29, // [29:29] is the sub-list for extension type_name - 29, // [29:29] is the sub-list for extension extendee - 0, // [0:29] is the sub-list for field type_name + 30, // 45: OpenIMServer.msg.msg.ClearConversationsMsg:output_type -> OpenIMServer.msg.ClearConversationsMsgResp + 32, // 46: OpenIMServer.msg.msg.UserClearAllMsg:output_type -> OpenIMServer.msg.UserClearAllMsgResp + 34, // 47: OpenIMServer.msg.msg.DeleteMsgs:output_type -> OpenIMServer.msg.DeleteMsgsResp + 38, // 48: OpenIMServer.msg.msg.DeleteMsgPhysicalBySeq:output_type -> OpenIMServer.msg.DeleteMsgPhysicalBySeqResp + 36, // 49: OpenIMServer.msg.msg.DeleteMsgPhysical:output_type -> OpenIMServer.msg.DeleteMsgPhysicalResp + 9, // 50: OpenIMServer.msg.msg.SetSendMsgStatus:output_type -> OpenIMServer.msg.SetSendMsgStatusResp + 11, // 51: OpenIMServer.msg.msg.GetSendMsgStatus:output_type -> OpenIMServer.msg.GetSendMsgStatusResp + 28, // 52: OpenIMServer.msg.msg.RevokeMsg:output_type -> OpenIMServer.msg.RevokeMsgResp + 14, // 53: OpenIMServer.msg.msg.SetMessageReactionExtensions:output_type -> OpenIMServer.msg.SetMessageReactionExtensionsResp + 16, // 54: OpenIMServer.msg.msg.GetMessagesReactionExtensions:output_type -> OpenIMServer.msg.GetMessagesReactionExtensionsResp + 18, // 55: OpenIMServer.msg.msg.AddMessageReactionExtensions:output_type -> OpenIMServer.msg.ModifyMessageReactionExtensionsResp + 20, // 56: OpenIMServer.msg.msg.DeleteMessageReactionExtensions:output_type -> OpenIMServer.msg.DeleteMessagesReactionExtensionsResp + 42, // [42:57] is the sub-list for method output_type + 27, // [27:42] is the sub-list for method input_type + 27, // [27:27] is the sub-list for extension type_name + 27, // [27:27] is the sub-list for extension extendee + 0, // [0:27] is the sub-list for field type_name } func init() { file_msg_msg_proto_init() } @@ -2908,7 +2918,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClearMsgReq); i { + switch v := v.(*SetSendMsgStatusReq); i { case 0: return &v.state case 1: @@ -2920,7 +2930,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClearMsgResp); i { + switch v := v.(*SetSendMsgStatusResp); i { case 0: return &v.state case 1: @@ -2932,7 +2942,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetMsgMinSeqReq); i { + switch v := v.(*GetSendMsgStatusReq); i { case 0: return &v.state case 1: @@ -2944,7 +2954,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetMsgMinSeqResp); i { + switch v := v.(*GetSendMsgStatusResp); i { case 0: return &v.state case 1: @@ -2956,7 +2966,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetSendMsgStatusReq); i { + switch v := v.(*ModifyMessageReactionExtensionsReq); i { case 0: return &v.state case 1: @@ -2968,7 +2978,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetSendMsgStatusResp); i { + switch v := v.(*SetMessageReactionExtensionsReq); i { case 0: return &v.state case 1: @@ -2980,7 +2990,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSendMsgStatusReq); i { + switch v := v.(*SetMessageReactionExtensionsResp); i { case 0: return &v.state case 1: @@ -2992,7 +3002,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSendMsgStatusResp); i { + switch v := v.(*GetMessagesReactionExtensionsReq); i { case 0: return &v.state case 1: @@ -3004,7 +3014,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DelSuperGroupMsgReq); i { + switch v := v.(*GetMessagesReactionExtensionsResp); i { case 0: return &v.state case 1: @@ -3016,7 +3026,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DelSuperGroupMsgResp); i { + switch v := v.(*SingleMessageExtensionResult); i { case 0: return &v.state case 1: @@ -3028,7 +3038,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSuperGroupMsgReq); i { + switch v := v.(*ModifyMessageReactionExtensionsResp); i { case 0: return &v.state case 1: @@ -3040,7 +3050,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSuperGroupMsgResp); i { + switch v := v.(*DeleteMessagesReactionExtensionsReq); i { case 0: return &v.state case 1: @@ -3052,7 +3062,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetWriteDiffMsgReq); i { + switch v := v.(*DeleteMessagesReactionExtensionsResp); i { case 0: return &v.state case 1: @@ -3064,7 +3074,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetWriteDiffMsgResp); i { + switch v := v.(*ExtendMsgResp); i { case 0: return &v.state case 1: @@ -3076,7 +3086,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ModifyMessageReactionExtensionsReq); i { + switch v := v.(*ExtendMsg); i { case 0: return &v.state case 1: @@ -3088,7 +3098,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetMessageReactionExtensionsReq); i { + switch v := v.(*KeyValueResp); i { case 0: return &v.state case 1: @@ -3100,7 +3110,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetMessageReactionExtensionsResp); i { + switch v := v.(*MsgDataToModifyByMQ); i { case 0: return &v.state case 1: @@ -3112,7 +3122,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetMessagesReactionExtensionsReq); i { + switch v := v.(*DelMsgsReq); i { case 0: return &v.state case 1: @@ -3124,7 +3134,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetMessagesReactionExtensionsResp); i { + switch v := v.(*DelMsgsResp); i { case 0: return &v.state case 1: @@ -3136,7 +3146,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SingleMessageExtensionResult); i { + switch v := v.(*RevokeMsgReq); i { case 0: return &v.state case 1: @@ -3148,7 +3158,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ModifyMessageReactionExtensionsResp); i { + switch v := v.(*RevokeMsgResp); i { case 0: return &v.state case 1: @@ -3160,7 +3170,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteMessagesReactionExtensionsReq); i { + switch v := v.(*ClearConversationsMsgReq); i { case 0: return &v.state case 1: @@ -3172,7 +3182,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteMessagesReactionExtensionsResp); i { + switch v := v.(*ClearConversationsMsgResp); i { case 0: return &v.state case 1: @@ -3184,7 +3194,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExtendMsgResp); i { + switch v := v.(*UserClearAllMsgReq); i { case 0: return &v.state case 1: @@ -3196,7 +3206,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExtendMsg); i { + switch v := v.(*UserClearAllMsgResp); i { case 0: return &v.state case 1: @@ -3208,7 +3218,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyValueResp); i { + switch v := v.(*DeleteMsgsReq); i { case 0: return &v.state case 1: @@ -3220,7 +3230,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgDataToModifyByMQ); i { + switch v := v.(*DeleteMsgsResp); i { case 0: return &v.state case 1: @@ -3232,7 +3242,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DelMsgsReq); i { + switch v := v.(*DeleteMsgPhysicalReq); i { case 0: return &v.state case 1: @@ -3244,7 +3254,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DelMsgsResp); i { + switch v := v.(*DeleteMsgPhysicalResp); i { case 0: return &v.state case 1: @@ -3256,7 +3266,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RevokeMsgReq); i { + switch v := v.(*DeleteMsgPhysicalBySeqReq); i { case 0: return &v.state case 1: @@ -3268,7 +3278,7 @@ func file_msg_msg_proto_init() { } } file_msg_msg_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RevokeMsgResp); i { + switch v := v.(*DeleteMsgPhysicalBySeqResp); i { case 0: return &v.state case 1: @@ -3330,12 +3340,16 @@ type MsgClient interface { PullMessageBySeqs(ctx context.Context, in *sdkws.PullMessageBySeqsReq, opts ...grpc.CallOption) (*sdkws.PullMessageBySeqsResp, error) // 发送消息 SendMsg(ctx context.Context, in *SendMsgReq, opts ...grpc.CallOption) (*SendMsgResp, error) - // 删除某人消息 - DelMsgs(ctx context.Context, in *DelMsgsReq, opts ...grpc.CallOption) (*DelMsgsResp, error) - // 删除某个用户某个大群消息 - DelSuperGroupMsg(ctx context.Context, in *DelSuperGroupMsgReq, opts ...grpc.CallOption) (*DelSuperGroupMsgResp, error) - // 清空某人所有消息 - ClearMsg(ctx context.Context, in *ClearMsgReq, opts ...grpc.CallOption) (*ClearMsgResp, error) + // 全量清空指定会话消息 重置min seq 比最大seq大1 + ClearConversationsMsg(ctx context.Context, in *ClearConversationsMsgReq, opts ...grpc.CallOption) (*ClearConversationsMsgResp, error) + // 删除用户全部消息 重置min seq 比最大seq大1 + UserClearAllMsg(ctx context.Context, in *UserClearAllMsgReq, opts ...grpc.CallOption) (*UserClearAllMsgResp, error) + // 用户标记删除部分消息by Seq + DeleteMsgs(ctx context.Context, in *DeleteMsgsReq, opts ...grpc.CallOption) (*DeleteMsgsResp, error) + // seq物理删除消息 + DeleteMsgPhysicalBySeq(ctx context.Context, in *DeleteMsgPhysicalBySeqReq, opts ...grpc.CallOption) (*DeleteMsgPhysicalBySeqResp, error) + // 物理删除消息by 时间 + DeleteMsgPhysical(ctx context.Context, in *DeleteMsgPhysicalReq, opts ...grpc.CallOption) (*DeleteMsgPhysicalResp, error) // 设置消息是否发送成功-针对api发送的消息 SetSendMsgStatus(ctx context.Context, in *SetSendMsgStatusReq, opts ...grpc.CallOption) (*SetSendMsgStatusResp, error) // 获取消息发送状态 @@ -3383,27 +3397,45 @@ func (c *msgClient) SendMsg(ctx context.Context, in *SendMsgReq, opts ...grpc.Ca return out, nil } -func (c *msgClient) DelMsgs(ctx context.Context, in *DelMsgsReq, opts ...grpc.CallOption) (*DelMsgsResp, error) { - out := new(DelMsgsResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.msg.msg/DelMsgs", in, out, opts...) +func (c *msgClient) ClearConversationsMsg(ctx context.Context, in *ClearConversationsMsgReq, opts ...grpc.CallOption) (*ClearConversationsMsgResp, error) { + out := new(ClearConversationsMsgResp) + err := c.cc.Invoke(ctx, "/OpenIMServer.msg.msg/ClearConversationsMsg", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UserClearAllMsg(ctx context.Context, in *UserClearAllMsgReq, opts ...grpc.CallOption) (*UserClearAllMsgResp, error) { + out := new(UserClearAllMsgResp) + err := c.cc.Invoke(ctx, "/OpenIMServer.msg.msg/UserClearAllMsg", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) DeleteMsgs(ctx context.Context, in *DeleteMsgsReq, opts ...grpc.CallOption) (*DeleteMsgsResp, error) { + out := new(DeleteMsgsResp) + err := c.cc.Invoke(ctx, "/OpenIMServer.msg.msg/DeleteMsgs", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *msgClient) DelSuperGroupMsg(ctx context.Context, in *DelSuperGroupMsgReq, opts ...grpc.CallOption) (*DelSuperGroupMsgResp, error) { - out := new(DelSuperGroupMsgResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.msg.msg/DelSuperGroupMsg", in, out, opts...) +func (c *msgClient) DeleteMsgPhysicalBySeq(ctx context.Context, in *DeleteMsgPhysicalBySeqReq, opts ...grpc.CallOption) (*DeleteMsgPhysicalBySeqResp, error) { + out := new(DeleteMsgPhysicalBySeqResp) + err := c.cc.Invoke(ctx, "/OpenIMServer.msg.msg/DeleteMsgPhysicalBySeq", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *msgClient) ClearMsg(ctx context.Context, in *ClearMsgReq, opts ...grpc.CallOption) (*ClearMsgResp, error) { - out := new(ClearMsgResp) - err := c.cc.Invoke(ctx, "/OpenIMServer.msg.msg/ClearMsg", in, out, opts...) +func (c *msgClient) DeleteMsgPhysical(ctx context.Context, in *DeleteMsgPhysicalReq, opts ...grpc.CallOption) (*DeleteMsgPhysicalResp, error) { + out := new(DeleteMsgPhysicalResp) + err := c.cc.Invoke(ctx, "/OpenIMServer.msg.msg/DeleteMsgPhysical", in, out, opts...) if err != nil { return nil, err } @@ -3481,12 +3513,16 @@ type MsgServer interface { PullMessageBySeqs(context.Context, *sdkws.PullMessageBySeqsReq) (*sdkws.PullMessageBySeqsResp, error) // 发送消息 SendMsg(context.Context, *SendMsgReq) (*SendMsgResp, error) - // 删除某人消息 - DelMsgs(context.Context, *DelMsgsReq) (*DelMsgsResp, error) - // 删除某个用户某个大群消息 - DelSuperGroupMsg(context.Context, *DelSuperGroupMsgReq) (*DelSuperGroupMsgResp, error) - // 清空某人所有消息 - ClearMsg(context.Context, *ClearMsgReq) (*ClearMsgResp, error) + // 全量清空指定会话消息 重置min seq 比最大seq大1 + ClearConversationsMsg(context.Context, *ClearConversationsMsgReq) (*ClearConversationsMsgResp, error) + // 删除用户全部消息 重置min seq 比最大seq大1 + UserClearAllMsg(context.Context, *UserClearAllMsgReq) (*UserClearAllMsgResp, error) + // 用户标记删除部分消息by Seq + DeleteMsgs(context.Context, *DeleteMsgsReq) (*DeleteMsgsResp, error) + // seq物理删除消息 + DeleteMsgPhysicalBySeq(context.Context, *DeleteMsgPhysicalBySeqReq) (*DeleteMsgPhysicalBySeqResp, error) + // 物理删除消息by 时间 + DeleteMsgPhysical(context.Context, *DeleteMsgPhysicalReq) (*DeleteMsgPhysicalResp, error) // 设置消息是否发送成功-针对api发送的消息 SetSendMsgStatus(context.Context, *SetSendMsgStatusReq) (*SetSendMsgStatusResp, error) // 获取消息发送状态 @@ -3512,14 +3548,20 @@ func (*UnimplementedMsgServer) PullMessageBySeqs(context.Context, *sdkws.PullMes func (*UnimplementedMsgServer) SendMsg(context.Context, *SendMsgReq) (*SendMsgResp, error) { return nil, status.Errorf(codes.Unimplemented, "method SendMsg not implemented") } -func (*UnimplementedMsgServer) DelMsgs(context.Context, *DelMsgsReq) (*DelMsgsResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method DelMsgs not implemented") +func (*UnimplementedMsgServer) ClearConversationsMsg(context.Context, *ClearConversationsMsgReq) (*ClearConversationsMsgResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method ClearConversationsMsg not implemented") } -func (*UnimplementedMsgServer) DelSuperGroupMsg(context.Context, *DelSuperGroupMsgReq) (*DelSuperGroupMsgResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method DelSuperGroupMsg not implemented") +func (*UnimplementedMsgServer) UserClearAllMsg(context.Context, *UserClearAllMsgReq) (*UserClearAllMsgResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method UserClearAllMsg not implemented") } -func (*UnimplementedMsgServer) ClearMsg(context.Context, *ClearMsgReq) (*ClearMsgResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method ClearMsg not implemented") +func (*UnimplementedMsgServer) DeleteMsgs(context.Context, *DeleteMsgsReq) (*DeleteMsgsResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteMsgs not implemented") +} +func (*UnimplementedMsgServer) DeleteMsgPhysicalBySeq(context.Context, *DeleteMsgPhysicalBySeqReq) (*DeleteMsgPhysicalBySeqResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteMsgPhysicalBySeq not implemented") +} +func (*UnimplementedMsgServer) DeleteMsgPhysical(context.Context, *DeleteMsgPhysicalReq) (*DeleteMsgPhysicalResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteMsgPhysical not implemented") } func (*UnimplementedMsgServer) SetSendMsgStatus(context.Context, *SetSendMsgStatusReq) (*SetSendMsgStatusResp, error) { return nil, status.Errorf(codes.Unimplemented, "method SetSendMsgStatus not implemented") @@ -3601,56 +3643,92 @@ func _Msg_SendMsg_Handler(srv interface{}, ctx context.Context, dec func(interfa return interceptor(ctx, in, info, handler) } -func _Msg_DelMsgs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DelMsgsReq) +func _Msg_ClearConversationsMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ClearConversationsMsgReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ClearConversationsMsg(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMServer.msg.msg/ClearConversationsMsg", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ClearConversationsMsg(ctx, req.(*ClearConversationsMsgReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UserClearAllMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UserClearAllMsgReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UserClearAllMsg(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMServer.msg.msg/UserClearAllMsg", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UserClearAllMsg(ctx, req.(*UserClearAllMsgReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_DeleteMsgs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteMsgsReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).DelMsgs(ctx, in) + return srv.(MsgServer).DeleteMsgs(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/OpenIMServer.msg.msg/DelMsgs", + FullMethod: "/OpenIMServer.msg.msg/DeleteMsgs", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).DelMsgs(ctx, req.(*DelMsgsReq)) + return srv.(MsgServer).DeleteMsgs(ctx, req.(*DeleteMsgsReq)) } return interceptor(ctx, in, info, handler) } -func _Msg_DelSuperGroupMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DelSuperGroupMsgReq) +func _Msg_DeleteMsgPhysicalBySeq_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteMsgPhysicalBySeqReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).DelSuperGroupMsg(ctx, in) + return srv.(MsgServer).DeleteMsgPhysicalBySeq(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/OpenIMServer.msg.msg/DelSuperGroupMsg", + FullMethod: "/OpenIMServer.msg.msg/DeleteMsgPhysicalBySeq", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).DelSuperGroupMsg(ctx, req.(*DelSuperGroupMsgReq)) + return srv.(MsgServer).DeleteMsgPhysicalBySeq(ctx, req.(*DeleteMsgPhysicalBySeqReq)) } return interceptor(ctx, in, info, handler) } -func _Msg_ClearMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ClearMsgReq) +func _Msg_DeleteMsgPhysical_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteMsgPhysicalReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).ClearMsg(ctx, in) + return srv.(MsgServer).DeleteMsgPhysical(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/OpenIMServer.msg.msg/ClearMsg", + FullMethod: "/OpenIMServer.msg.msg/DeleteMsgPhysical", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ClearMsg(ctx, req.(*ClearMsgReq)) + return srv.(MsgServer).DeleteMsgPhysical(ctx, req.(*DeleteMsgPhysicalReq)) } return interceptor(ctx, in, info, handler) } @@ -3798,16 +3876,24 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_SendMsg_Handler, }, { - MethodName: "DelMsgs", - Handler: _Msg_DelMsgs_Handler, + MethodName: "ClearConversationsMsg", + Handler: _Msg_ClearConversationsMsg_Handler, + }, + { + MethodName: "UserClearAllMsg", + Handler: _Msg_UserClearAllMsg_Handler, + }, + { + MethodName: "DeleteMsgs", + Handler: _Msg_DeleteMsgs_Handler, }, { - MethodName: "DelSuperGroupMsg", - Handler: _Msg_DelSuperGroupMsg_Handler, + MethodName: "DeleteMsgPhysicalBySeq", + Handler: _Msg_DeleteMsgPhysicalBySeq_Handler, }, { - MethodName: "ClearMsg", - Handler: _Msg_ClearMsg_Handler, + MethodName: "DeleteMsgPhysical", + Handler: _Msg_DeleteMsgPhysical_Handler, }, { MethodName: "SetSendMsgStatus", diff --git a/pkg/proto/msg/msg.proto b/pkg/proto/msg/msg.proto index 29b7071a0..e0568064b 100644 --- a/pkg/proto/msg/msg.proto +++ b/pkg/proto/msg/msg.proto @@ -44,21 +44,6 @@ message SendMsgResp { } -message ClearMsgReq{ - string userID = 1; -} - - -message ClearMsgResp{ -} - -message SetMsgMinSeqReq{ - string userID = 1; - string groupID = 2; - uint32 minSeq = 3; -} -message SetMsgMinSeqResp{ -} message SetSendMsgStatusReq{ int32 status = 1; @@ -74,28 +59,6 @@ message GetSendMsgStatusResp{ int32 status = 1; } -message DelSuperGroupMsgReq{ - string userID = 1; - string groupID = 2; -} - -message DelSuperGroupMsgResp{ -} - -message GetSuperGroupMsgReq{ - int64 Seq = 1; - string groupID = 2; -} -message GetSuperGroupMsgResp{ - sdkws.MsgData msgData = 1; -} - -message GetWriteDiffMsgReq{ - int64 Seq = 1; -} -message GetWriteDiffMsgResp{ - sdkws.MsgData msgData = 2; -} message ModifyMessageReactionExtensionsReq { string conversationID = 1; @@ -205,6 +168,46 @@ message RevokeMsgReq { message RevokeMsgResp { } +message ClearConversationsMsgReq { + repeated string conversationIDs = 1; + string userID = 2; +} + +message ClearConversationsMsgResp { +} + +message UserClearAllMsgReq { + string userID = 1; +} + +message UserClearAllMsgResp { +} + +message DeleteMsgsReq { + string conversationID = 1; + repeated int64 seqs = 2; + string userID = 3; +} + +message DeleteMsgsResp { +} + +message DeleteMsgPhysicalReq { + repeated string conversationIDs = 1; + int64 remainTime = 2; +} + +message DeleteMsgPhysicalResp { +} + +message DeleteMsgPhysicalBySeqReq { + string conversationID = 1; + repeated int64 seqs = 2; +} + +message DeleteMsgPhysicalBySeqResp { +} + service msg { //获取最小最大seq(包括用户的,以及指定群组的) rpc GetMaxSeq(sdkws.GetMaxSeqReq) returns(sdkws.GetMaxSeqResp); @@ -212,12 +215,18 @@ service msg { rpc PullMessageBySeqs(sdkws.PullMessageBySeqsReq) returns(sdkws.PullMessageBySeqsResp); //发送消息 rpc SendMsg(SendMsgReq) returns(SendMsgResp); - //删除某人消息 - rpc DelMsgs(DelMsgsReq) returns(DelMsgsResp); - //删除某个用户某个大群消息 - rpc DelSuperGroupMsg(DelSuperGroupMsgReq) returns(DelSuperGroupMsgResp); - //清空某人所有消息 - rpc ClearMsg(ClearMsgReq) returns(ClearMsgResp); + + // 全量清空指定会话消息 重置min seq 比最大seq大1 + rpc ClearConversationsMsg(ClearConversationsMsgReq) returns(ClearConversationsMsgResp); + // 删除用户全部消息 重置min seq 比最大seq大1 + rpc UserClearAllMsg(UserClearAllMsgReq) returns(UserClearAllMsgResp); + // 用户标记删除部分消息by Seq + rpc DeleteMsgs(DeleteMsgsReq) returns(DeleteMsgsResp); + // seq物理删除消息 + rpc DeleteMsgPhysicalBySeq(DeleteMsgPhysicalBySeqReq) returns(DeleteMsgPhysicalBySeqResp); + // 物理删除消息by 时间 + rpc DeleteMsgPhysical(DeleteMsgPhysicalReq) returns(DeleteMsgPhysicalResp); + //设置消息是否发送成功-针对api发送的消息 rpc SetSendMsgStatus(SetSendMsgStatusReq) returns(SetSendMsgStatusResp); //获取消息发送状态 diff --git a/pkg/utils/utils_v2.go b/pkg/utils/utils_v2.go index 9143b0685..777308fd7 100644 --- a/pkg/utils/utils_v2.go +++ b/pkg/utils/utils_v2.go @@ -80,6 +80,15 @@ func DistinctAnyGetComparable[E any, K comparable](es []E, fn func(e E) K) []K { // Distinct 去重 func Distinct[T comparable](ts []T) []T { + if len(ts) < 2 { + return ts + } else if len(ts) == 2 { + if ts[0] == ts[1] { + return ts[:1] + } else { + return ts + } + } return DistinctAny(ts, func(t T) T { return t })