From 0b306d996dcd9f938e64a2d13eee17f77c252981 Mon Sep 17 00:00:00 2001 From: Alan <68671759+hanzhixiao@users.noreply.github.com> Date: Thu, 13 Jul 2023 15:11:33 +0800 Subject: [PATCH 1/3] all back-office api (#533) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix conflict Signed-off-by: ‘hanzhixiao’ <‘709674996@qq.com’> * all Back-office management api Signed-off-by: ‘hanzhixiao’ <‘709674996@qq.com’> --------- Signed-off-by: ‘hanzhixiao’ <‘709674996@qq.com’> Co-authored-by: ‘hanzhixiao’ <‘709674996@qq.com’> --- internal/api/group.go | 3 + internal/api/msg.go | 113 ++- internal/api/route.go | 5 + internal/api/third.go | 59 ++ internal/msgtransfer/init.go | 5 +- internal/rpc/msg/revoke.go | 21 + internal/rpc/msg/server.go | 5 +- internal/rpc/msg/sync_msg.go | 49 + internal/tools/msg.go | 2 +- pkg/common/db/controller/msg.go | 25 +- pkg/common/db/relation/group_model.go | 5 +- pkg/common/db/table/unrelation/msg.go | 2 + pkg/common/db/unrelation/msg.go | 134 +++ pkg/proto/auth/auth.pb.go | 19 +- pkg/proto/conversation/conversation.pb.go | 22 +- pkg/proto/errinfo/errinfo.pb.go | 19 +- pkg/proto/friend/friend.pb.go | 22 +- pkg/proto/group/group.pb.go | 24 +- pkg/proto/msg/msg.pb.go | 1092 +++++++++++++++++---- pkg/proto/msg/msg.proto | 54 + pkg/proto/msggateway/msggateway.pb.go | 22 +- pkg/proto/push/push.pb.go | 22 +- pkg/proto/sdkws/sdkws.pb.go | 22 +- pkg/proto/statistics/statistics.pb.go | 17 +- pkg/proto/third/third.pb.go | 19 +- pkg/proto/user/user.pb.go | 24 +- pkg/proto/wrapperspb/wrapperspb.pb.go | 19 +- pkg/rpcclient/msg.go | 14 + pkg/rpcclient/third.go | 37 +- 29 files changed, 1627 insertions(+), 249 deletions(-) diff --git a/internal/api/group.go b/internal/api/group.go index 2e293f72a..a87af8e6b 100644 --- a/internal/api/group.go +++ b/internal/api/group.go @@ -132,3 +132,6 @@ func (o *GroupApi) GetSuperGroupsInfo(c *gin.Context) { func (o *GroupApi) GroupCreateCount(c *gin.Context) { a2r.Call(group.GroupClient.GroupCreateCount, o.Client, c) } +func (o *GroupApi) GetGroups(c *gin.Context) { + a2r.Call(group.GroupClient.GetGroups, o.Client, c) +} diff --git a/internal/api/msg.go b/internal/api/msg.go index 7e9101681..45a551cc2 100644 --- a/internal/api/msg.go +++ b/internal/api/msg.go @@ -15,6 +15,7 @@ package api import ( + "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/user" "github.com/gin-gonic/gin" "github.com/go-playground/validator/v10" "github.com/mitchellh/mapstructure" @@ -204,7 +205,7 @@ func (m *MessageApi) SendMessage(c *gin.Context) { if err := mapstructure.WeakDecode(params.Content, &data); err != nil { apiresp.GinError(c, errs.ErrArgs.Wrap(err.Error())) return - } else if err := m.validate.Struct(data); err != nil { + } else if err := m.validate.Struct(params); err != nil { apiresp.GinError(c, errs.ErrArgs.Wrap(err.Error())) return } @@ -227,7 +228,107 @@ func (m *MessageApi) SendMessage(c *gin.Context) { } func (m *MessageApi) ManagementBatchSendMsg(c *gin.Context) { - a2r.Call(msg.MsgClient.SendMsg, m.Client, c) + params := apistruct.ManagementBatchSendMsgReq{} + resp := apistruct.ManagementBatchSendMsgResp{} + var msgSendFailedFlag bool + if err := c.BindJSON(¶ms); err != nil { + apiresp.GinError(c, errs.ErrArgs.WithDetail(err.Error()).Wrap()) + return + } + if !tokenverify.IsAppManagerUid(c) { + apiresp.GinError(c, errs.ErrNoPermission.Wrap("only app manager can send message")) + return + } + + var data interface{} + switch params.ContentType { + case constant.Text: + data = apistruct.TextElem{} + case constant.Picture: + data = apistruct.PictureElem{} + case constant.Voice: + data = apistruct.SoundElem{} + case constant.Video: + data = apistruct.VideoElem{} + case constant.File: + data = apistruct.FileElem{} + case constant.Custom: + data = apistruct.CustomElem{} + case constant.Revoke: + data = apistruct.RevokeElem{} + case constant.OANotification: + data = apistruct.OANotificationElem{} + params.SessionType = constant.NotificationChatType + case constant.CustomNotTriggerConversation: + data = apistruct.CustomElem{} + case constant.CustomOnlineOnly: + data = apistruct.CustomElem{} + default: + apiresp.GinError(c, errs.ErrArgs.WithDetail("not support err contentType").Wrap()) + return + } + if err := mapstructure.WeakDecode(params.Content, &data); err != nil { + apiresp.GinError(c, errs.ErrArgs.Wrap(err.Error())) + return + } else if err := m.validate.Struct(params); err != nil { + apiresp.GinError(c, errs.ErrArgs.Wrap(err.Error())) + return + } + + t := &apistruct.ManagementSendMsgReq{ + SendID: params.SendID, + GroupID: params.GroupID, + SenderNickname: params.SenderNickname, + SenderFaceURL: params.SenderFaceURL, + SenderPlatformID: params.SenderPlatformID, + Content: params.Content, + ContentType: params.ContentType, + SessionType: params.SessionType, + IsOnlineOnly: params.IsOnlineOnly, + NotOfflinePush: params.NotOfflinePush, + OfflinePushInfo: params.OfflinePushInfo, + } + pbReq := m.newUserSendMsgReq(c, t) + var recvList []string + if params.IsSendAll { + req2 := &user.GetAllUserIDReq{} + resp2, err := m.Message.GetAllUserID(c, req2) + if err != nil { + apiresp.GinError(c, errs.ErrArgs.Wrap(err.Error())) + return + } + recvList = resp2.UserIDs + } else { + recvList = params.RecvIDList + } + + for _, recvID := range recvList { + pbReq.MsgData.RecvID = recvID + rpcResp, err := m.Client.SendMsg(c, pbReq) + if err != nil { + resp.Data.FailedIDList = append(resp.Data.FailedIDList, recvID) + msgSendFailedFlag = true + continue + } + resp.Data.ResultList = append(resp.Data.ResultList, &apistruct.SingleReturnResult{ + ServerMsgID: rpcResp.ServerMsgID, + ClientMsgID: rpcResp.ClientMsgID, + SendTime: rpcResp.SendTime, + RecvID: recvID, + }) + } + var status int32 + if msgSendFailedFlag { + status = constant.MsgSendFailed + } else { + status = constant.MsgSendSuccessed + } + _, err := m.Client.SetSendMsgStatus(c, &msg.SetSendMsgStatusReq{Status: status}) + if err != nil { + apiresp.GinError(c, errs.ErrArgs.Wrap(err.Error())) + return + } + apiresp.GinSuccess(c, resp) } func (m *MessageApi) CheckMsgIsSendSuccess(c *gin.Context) { @@ -245,3 +346,11 @@ func (m *MessageApi) GetActiveUser(c *gin.Context) { func (m *MessageApi) GetActiveGroup(c *gin.Context) { a2r.Call(msg.MsgClient.GetActiveGroup, m.Client, c) } + +func (m *MessageApi) SearchMsg(c *gin.Context) { + a2r.Call(msg.MsgClient.SearchMessage, m.Client, c) +} + +func (m *MessageApi) ManagementMsg(c *gin.Context) { + a2r.Call(msg.MsgClient.ManageMsg, m.Client, c) +} diff --git a/internal/api/route.go b/internal/api/route.go index b37e5a3f7..273386853 100644 --- a/internal/api/route.go +++ b/internal/api/route.go @@ -103,6 +103,7 @@ func NewGinRouter(discov discoveryregistry.SvcDiscoveryRegistry, rdb redis.Unive groupRouterGroup.POST("/cancel_mute_group", g.CancelMuteGroup) groupRouterGroup.POST("/set_group_member_info", g.SetGroupMemberInfo) groupRouterGroup.POST("/get_group_abstract_info", g.GetGroupAbstractInfo) + groupRouterGroup.POST("/get_groups", g.GetGroups) } superGroupRouterGroup := r.Group("/super_group", ParseToken) { @@ -124,6 +125,8 @@ func NewGinRouter(discov discoveryregistry.SvcDiscoveryRegistry, rdb redis.Unive thirdGroup.POST("/fcm_update_token", t.FcmUpdateToken) thirdGroup.POST("/set_app_badge", t.SetAppBadge) + thirdGroup.POST("/minio_upload", t.MinioUploadFile) + objectGroup := r.Group("/object", ParseToken) objectGroup.POST("/part_limit", t.PartLimit) @@ -138,10 +141,12 @@ func NewGinRouter(discov discoveryregistry.SvcDiscoveryRegistry, rdb redis.Unive msgGroup := r.Group("/msg", ParseToken) { msgGroup.POST("/newest_seq", m.GetSeq) + msgGroup.POST("/search_msg", m.SearchMsg) msgGroup.POST("/send_msg", m.SendMessage) msgGroup.POST("/pull_msg_by_seq", m.PullMsgBySeqs) msgGroup.POST("/revoke_msg", m.RevokeMsg) msgGroup.POST("/mark_msgs_as_read", m.MarkMsgsAsRead) + msgGroup.POST("/manage_msg", m.ManagementMsg) msgGroup.POST("/mark_conversation_as_read", m.MarkConversationAsRead) msgGroup.POST("/get_conversations_has_read_and_max_seq", m.GetConversationsHasReadAndMaxSeq) msgGroup.POST("/set_conversation_has_read_seq", m.SetConversationHasReadSeq) diff --git a/internal/api/third.go b/internal/api/third.go index 895e3784f..19beeeb11 100644 --- a/internal/api/third.go +++ b/internal/api/third.go @@ -1,6 +1,11 @@ package api import ( + "github.com/OpenIMSDK/Open-IM-Server/pkg/apistruct" + "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/utils" + "github.com/minio/minio-go/v7" "math/rand" "net/http" "strconv" @@ -84,3 +89,57 @@ func (o *ThirdApi) ObjectRedirect(c *gin.Context) { } c.Redirect(http.StatusTemporaryRedirect, resp.Url) } + +func (o *ThirdApi) MinioUploadFile(c *gin.Context) { + var ( + req apistruct.MinioUploadFileReq + resp apistruct.MinioUploadFile + ) + + if err := c.Bind(&req); err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + return + } + switch req.FileType { + // videoType upload snapShot + case constant.VideoType: + snapShotFile, err := c.FormFile("snapShot") + if err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "missing snapshot arg: " + err.Error()}) + return + } + snapShotFileObj, err := snapShotFile.Open() + if err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + return + } + snapShotNewName, snapShotNewType := utils.GetNewFileNameAndContentType(snapShotFile.Filename, constant.ImageType) + _, err = o.MinioClient.PutObject(c, config.Config.Object.Minio.Bucket, snapShotNewName, snapShotFileObj, snapShotFile.Size, minio.PutObjectOptions{ContentType: snapShotNewType}) + if err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) + return + } + resp.SnapshotURL = config.Config.Object.Minio.Endpoint + "/" + config.Config.Object.Minio.Bucket + "/" + snapShotNewName + resp.SnapshotNewName = snapShotNewName + } + file, err := c.FormFile("file") + if err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "missing file arg: " + err.Error()}) + return + } + fileObj, err := file.Open() + if err != nil { + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "invalid file path" + err.Error()}) + return + } + newName, newType := utils.GetNewFileNameAndContentType(file.Filename, req.FileType) + _, err = o.MinioClient.PutObject(c, config.Config.Object.Minio.Bucket, newName, fileObj, file.Size, minio.PutObjectOptions{ContentType: newType}) + if err != nil { + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "upload file error" + err.Error()}) + return + } + resp.NewName = newName + resp.URL = config.Config.Object.Minio.Endpoint + "/" + config.Config.Object.Minio.Bucket + "/" + newName + c.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": "", "data": resp}) + return +} diff --git a/internal/msgtransfer/init.go b/internal/msgtransfer/init.go index 3bad5f12e..8b812bac9 100644 --- a/internal/msgtransfer/init.go +++ b/internal/msgtransfer/init.go @@ -68,8 +68,9 @@ func StartTransfer(prometheusPort int) error { client.AddOption(mw.GrpcClient(), grpc.WithTransportCredentials(insecure.NewCredentials())) msgModel := cache.NewMsgCacheModel(rdb) msgDocModel := unrelation.NewMsgMongoDriver(mongo.GetDatabase()) - chatLogDatabase := controller.NewChatLogDatabase(relation.NewChatLogGorm(db)) - msgDatabase := controller.NewCommonMsgDatabase(msgDocModel, msgModel) + msgMysModel := relation.NewChatLogGorm(db) + chatLogDatabase := controller.NewChatLogDatabase(msgMysModel) + msgDatabase := controller.NewCommonMsgDatabase(msgDocModel, msgModel, msgMysModel) conversationRpcClient := rpcclient.NewConversationRpcClient(client) groupRpcClient := rpcclient.NewGroupRpcClient(client) msgTransfer := NewMsgTransfer(chatLogDatabase, msgDatabase, &conversationRpcClient, &groupRpcClient) diff --git a/internal/rpc/msg/revoke.go b/internal/rpc/msg/revoke.go index c95d347e7..8ad8d9d4a 100644 --- a/internal/rpc/msg/revoke.go +++ b/internal/rpc/msg/revoke.go @@ -124,3 +124,24 @@ func (m *msgServer) RevokeMsg(ctx context.Context, req *msg.RevokeMsgReq) (*msg. } return &msg.RevokeMsgResp{}, nil } + +func (m *msgServer) ManageMsg(ctx context.Context, req *msg.ManageMsgReq) (*msg.ManageMsgResp, error) { + resp := &msg.ManageMsgResp{} + msgData := &sdkws.MsgData{ + SendID: req.SendID, + RecvID: req.RecvID, + SessionType: req.SessionType, + GroupID: req.GroupID, + } + conversationID := utils.GetChatConversationIDByMsg(msgData) + revokeReq := &msg.RevokeMsgReq{ + ConversationID: conversationID, + Seq: req.Seq, + UserID: req.SendID, + } + _, err := m.RevokeMsg(ctx, revokeReq) + if err != nil { + return nil, err + } + return resp, nil +} diff --git a/internal/rpc/msg/server.go b/internal/rpc/msg/server.go index 15fc696d8..17aac5040 100644 --- a/internal/rpc/msg/server.go +++ b/internal/rpc/msg/server.go @@ -2,6 +2,7 @@ package msg import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation" "google.golang.org/grpc" @@ -61,11 +62,13 @@ func Start(client discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) e } cacheModel := cache.NewMsgCacheModel(rdb) msgDocModel := unrelation.NewMsgMongoDriver(mongo.GetDatabase()) - msgDatabase := controller.NewCommonMsgDatabase(msgDocModel, cacheModel) conversationClient := rpcclient.NewConversationRpcClient(client) userRpcClient := rpcclient.NewUserRpcClient(client) groupRpcClient := rpcclient.NewGroupRpcClient(client) friendRpcClient := rpcclient.NewFriendRpcClient(client) + mysql, err := relation.NewGormDB() + msgMysModel := relation.NewChatLogGorm(mysql) + msgDatabase := controller.NewCommonMsgDatabase(msgDocModel, cacheModel, msgMysModel) s := &msgServer{ Conversation: &conversationClient, User: &userRpcClient, diff --git a/internal/rpc/msg/sync_msg.go b/internal/rpc/msg/sync_msg.go index 7ac30ff1a..01510ffef 100644 --- a/internal/rpc/msg/sync_msg.go +++ b/internal/rpc/msg/sync_msg.go @@ -16,6 +16,8 @@ package msg import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" + "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/log" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/tokenverify" @@ -102,3 +104,50 @@ func (m *msgServer) GetMaxSeq(ctx context.Context, req *sdkws.GetMaxSeqReq) (*sd resp.MaxSeqs = maxSeqs return resp, nil } + +func (m *msgServer) SearchMessage(ctx context.Context, req *msg.SearchMessageReq) (resp *msg.SearchMessageResp, err error) { + var chatLogs []*sdkws.MsgData + resp = &msg.SearchMessageResp{} + if chatLogs, err = m.MsgDatabase.SearchMessage(ctx, req); err != nil { + return nil, err + } + var num int + for _, chatLog := range chatLogs { + pbChatLog := &msg.ChatLog{} + utils.CopyStructFields(pbChatLog, chatLog) + pbChatLog.SendTime = chatLog.SendTime + pbChatLog.CreateTime = chatLog.CreateTime + if chatLog.SenderNickname == "" { + sendUser, err := m.User.GetUserInfo(ctx, chatLog.SendID) + if err != nil { + return nil, err + } + pbChatLog.SenderNickname = sendUser.Nickname + } + switch chatLog.SessionType { + case constant.SingleChatType: + recvUser, err := m.User.GetUserInfo(ctx, chatLog.RecvID) + if err != nil { + return nil, err + } + pbChatLog.SenderNickname = recvUser.Nickname + + case constant.GroupChatType, constant.SuperGroupChatType: + group, err := m.Group.GetGroupInfo(ctx, chatLog.GroupID) + if err != nil { + return nil, err + } + pbChatLog.SenderFaceURL = group.FaceURL + pbChatLog.GroupMemberCount = group.MemberCount + pbChatLog.RecvID = group.GroupID + pbChatLog.GroupName = group.GroupName + pbChatLog.GroupOwner = group.OwnerUserID + pbChatLog.GroupType = group.GroupType + } + resp.ChatLogs = append(resp.ChatLogs, pbChatLog) + num++ + } + + resp.ChatLogsNum = int32(num) + return resp, nil +} diff --git a/internal/tools/msg.go b/internal/tools/msg.go index aa7f52f23..9d57da768 100644 --- a/internal/tools/msg.go +++ b/internal/tools/msg.go @@ -80,7 +80,7 @@ func InitMsgTool() (*MsgTool, error) { } discov.AddOption(mw.GrpcClient(), grpc.WithTransportCredentials(insecure.NewCredentials())) userDB := relation.NewUserGorm(db) - msgDatabase := controller.InitCommonMsgDatabase(rdb, mongo.GetDatabase()) + msgDatabase := controller.InitCommonMsgDatabase(rdb, mongo.GetDatabase(), db) userDatabase := controller.NewUserDatabase( userDB, cache.NewUserCacheRedis(rdb, relation.NewUserGorm(db), cache.GetDefaultOpt()), diff --git a/pkg/common/db/controller/msg.go b/pkg/common/db/controller/msg.go index b2855819f..b9aefdc72 100644 --- a/pkg/common/db/controller/msg.go +++ b/pkg/common/db/controller/msg.go @@ -1,6 +1,9 @@ package controller import ( + relation2 "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation" + "gorm.io/gorm" "time" "github.com/redis/go-redis/v9" @@ -102,6 +105,7 @@ type CommonMsgDatabase interface { ) (minSeqMongo, maxSeqMongo, minSeqCache, maxSeqCache int64, err error) SetSendMsgStatus(ctx context.Context, id string, status int32) error GetSendMsgStatus(ctx context.Context, id string) (int32, error) + SearchMessage(ctx context.Context, req *pbMsg.SearchMessageReq) (msgData []*sdkws.MsgData, err error) // to mq MsgToMQ(ctx context.Context, key string, msg2mq *sdkws.MsgData) error @@ -128,8 +132,9 @@ type CommonMsgDatabase interface { ) (msgCount int64, userCount int64, groups []*unRelationTb.GroupCount, dateCount map[string]int64, err error) } -func NewCommonMsgDatabase(msgDocModel unRelationTb.MsgDocModelInterface, cacheModel cache.MsgModel) CommonMsgDatabase { +func NewCommonMsgDatabase(msgDocModel unRelationTb.MsgDocModelInterface, cacheModel cache.MsgModel, msgMyqModel relation.ChatLogModelInterface) CommonMsgDatabase { return &commonMsgDatabase{ + msgMyq: msgMyqModel, msgDocDatabase: msgDocModel, cache: cacheModel, producer: kafka.NewKafkaProducer(config.Config.Kafka.Addr, config.Config.Kafka.LatestMsgToRedis.Topic), @@ -138,16 +143,18 @@ func NewCommonMsgDatabase(msgDocModel unRelationTb.MsgDocModelInterface, cacheMo } } -func InitCommonMsgDatabase(rdb redis.UniversalClient, database *mongo.Database) CommonMsgDatabase { +func InitCommonMsgDatabase(rdb redis.UniversalClient, database *mongo.Database, dbGrom *gorm.DB) CommonMsgDatabase { cacheModel := cache.NewMsgCacheModel(rdb) msgDocModel := unrelation.NewMsgMongoDriver(database) - CommonMsgDatabase := NewCommonMsgDatabase(msgDocModel, cacheModel) + msgMyqModel := relation2.NewChatLogGorm(dbGrom) + CommonMsgDatabase := NewCommonMsgDatabase(msgDocModel, cacheModel, msgMyqModel) return CommonMsgDatabase } type commonMsgDatabase struct { msgDocDatabase unRelationTb.MsgDocModelInterface msg unRelationTb.MsgDocModel + msgMyq relation.ChatLogModelInterface cache cache.MsgModel producer *kafka.Producer producerToMongo *kafka.Producer @@ -1163,3 +1170,15 @@ func (db *commonMsgDatabase) RangeGroupSendCount( ) (msgCount int64, userCount int64, groups []*unRelationTb.GroupCount, dateCount map[string]int64, err error) { return db.msgDocDatabase.RangeGroupSendCount(ctx, start, end, ase, pageNumber, showNumber) } + +func (db *commonMsgDatabase) SearchMessage(ctx context.Context, req *pbMsg.SearchMessageReq) (msgData []*sdkws.MsgData, err error) { + var totalMsgs []*sdkws.MsgData + msgs, err := db.msgDocDatabase.SearchMessage(ctx, req) + if err != nil { + return nil, err + } + for _, msg := range msgs { + totalMsgs = append(totalMsgs, convert.MsgDB2Pb(msg.Msg)) + } + return totalMsgs, nil +} diff --git a/pkg/common/db/relation/group_model.go b/pkg/common/db/relation/group_model.go index 402c77682..d115dd016 100644 --- a/pkg/common/db/relation/group_model.go +++ b/pkg/common/db/relation/group_model.go @@ -2,6 +2,7 @@ package relation import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" "time" "gorm.io/gorm" @@ -58,7 +59,9 @@ func (g *GroupGorm) Search( keyword string, pageNumber, showNumber int32, ) (total uint32, groups []*relation.GroupModel, err error) { - return ormutil.GormSearch[relation.GroupModel](g.DB, []string{"name"}, keyword, pageNumber, showNumber) + db := g.DB + db = db.WithContext(ctx).Where("status!=?", constant.GroupStatusDismissed) + return ormutil.GormSearch[relation.GroupModel](db, []string{"name"}, keyword, pageNumber, showNumber) } func (g *GroupGorm) GetGroupIDsByGroupType(ctx context.Context, groupType int) (groupIDs []string, err error) { diff --git a/pkg/common/db/table/unrelation/msg.go b/pkg/common/db/table/unrelation/msg.go index 103e68c22..3a8725f36 100644 --- a/pkg/common/db/table/unrelation/msg.go +++ b/pkg/common/db/table/unrelation/msg.go @@ -16,6 +16,7 @@ package unrelation import ( "context" + "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" "strconv" "time" @@ -108,6 +109,7 @@ type MsgDocModelInterface interface { GetMsgDocModelByIndex(ctx context.Context, conversationID string, index, sort int64) (*MsgDocModel, error) DeleteMsgsInOneDocByIndex(ctx context.Context, docID string, indexes []int) error MarkSingleChatMsgsAsRead(ctx context.Context, userID string, docID string, indexes []int64) error + SearchMessage(ctx context.Context, req *msg.SearchMessageReq) ([]*MsgInfoModel, error) RangeUserSendCount( ctx context.Context, start time.Time, diff --git a/pkg/common/db/unrelation/msg.go b/pkg/common/db/unrelation/msg.go index b7bf42ef4..5d26d45b2 100644 --- a/pkg/common/db/unrelation/msg.go +++ b/pkg/common/db/unrelation/msg.go @@ -19,6 +19,7 @@ import ( "encoding/json" "errors" "fmt" + "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg" "time" "github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant" @@ -1064,3 +1065,136 @@ func (m *MsgMongoDriver) RangeGroupSendCount( } return result[0].MsgCount, result[0].UserCount, groups, dateCount, nil } + +func (m *MsgMongoDriver) SearchMessage(ctx context.Context, req *msg.SearchMessageReq) ([]*table.MsgInfoModel, error) { + msgs, err := m.searchMessage(ctx, req) + if err != nil { + return nil, err + } + for _, msg1 := range msgs { + if msg1.IsRead { + msg1.Msg.IsRead = true + } + } + return msgs, nil +} + +func (m *MsgMongoDriver) searchMessage(ctx context.Context, req *msg.SearchMessageReq) ([]*table.MsgInfoModel, error) { + var pipe mongo.Pipeline + conditon := bson.A{} + if req.SendTime != "" { + conditon = append(conditon, bson.M{"$eq": bson.A{bson.M{"$dateToString": bson.M{"format": "%Y-%m-%d", "date": bson.M{"$toDate": "$$item.msg.send_time"}}}, req.SendTime}}) + } + if req.MsgType != 0 { + conditon = append(conditon, bson.M{"$eq": bson.A{"$$item.msg.content_type", req.MsgType}}) + } + if req.SessionType != 0 { + conditon = append(conditon, bson.M{"$eq": bson.A{"$$item.msg.session_type", req.SessionType}}) + } + if req.RecvID != "" { + conditon = append(conditon, bson.M{"$regexFind": bson.M{"input": "$$item.msg.recv_id", "regex": req.RecvID}}) + } + if req.SendID != "" { + conditon = append(conditon, bson.M{"$regexFind": bson.M{"input": "$$item.msg.send_id", "regex": req.SendID}}) + } + + or := bson.A{ + bson.M{ + "doc_id": bson.M{ + "$regex": "^si_", + "$options": "i", + }, + }, + } + or = append(or, + bson.M{ + "doc_id": bson.M{ + "$regex": "^g_", + "$options": "i", + }, + }, + bson.M{ + "doc_id": bson.M{ + "$regex": "^sg_", + "$options": "i", + }, + }, + ) + + pipe = mongo.Pipeline{ + { + {"$match", bson.D{ + { + "$or", or, + }, + }}, + }, + { + {"$project", bson.D{ + {"msgs", bson.D{ + {"$filter", bson.D{ + {"input", "$msgs"}, + {"as", "item"}, + {"cond", bson.D{ + {"$and", conditon}, + }, + }}, + }}, + }, + {"doc_id", 1}, + }}, + }, + } + cursor, err := m.MsgCollection.Aggregate(ctx, pipe) + if err != nil { + return nil, err + } + + var msgsDocs []table.MsgDocModel + err = cursor.All(ctx, &msgsDocs) + if err != nil { + return nil, err + } + if len(msgsDocs) == 0 { + return nil, errs.Wrap(mongo.ErrNoDocuments) + } + msgs := make([]*table.MsgInfoModel, 0) + for index, _ := range msgsDocs { + for i := range msgsDocs[index].Msg { + msg := msgsDocs[index].Msg[i] + if msg == nil || msg.Msg == nil { + continue + } + if msg.Revoke != nil { + revokeContent := sdkws.MessageRevokedContent{ + RevokerID: msg.Revoke.UserID, + RevokerRole: msg.Revoke.Role, + ClientMsgID: msg.Msg.ClientMsgID, + RevokerNickname: msg.Revoke.Nickname, + RevokeTime: msg.Revoke.Time, + SourceMessageSendTime: msg.Msg.SendTime, + SourceMessageSendID: msg.Msg.SendID, + SourceMessageSenderNickname: msg.Msg.SenderNickname, + SessionType: msg.Msg.SessionType, + Seq: msg.Msg.Seq, + Ex: msg.Msg.Ex, + } + data, err := json.Marshal(&revokeContent) + if err != nil { + return nil, err + } + elem := sdkws.NotificationElem{ + Detail: string(data), + } + content, err := json.Marshal(&elem) + if err != nil { + return nil, err + } + msg.Msg.ContentType = constant.MsgRevokeNotification + msg.Msg.Content = string(content) + } + msgs = append(msgs, msg) + } + } + return msgs, nil +} diff --git a/pkg/proto/auth/auth.pb.go b/pkg/proto/auth/auth.pb.go index 095998cc6..2d1e0493c 100644 --- a/pkg/proto/auth/auth.pb.go +++ b/pkg/proto/auth/auth.pb.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.29.1 @@ -8,14 +22,13 @@ package auth import ( context "context" - reflect "reflect" - sync "sync" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( diff --git a/pkg/proto/conversation/conversation.pb.go b/pkg/proto/conversation/conversation.pb.go index 7ec352420..cf5de48a7 100644 --- a/pkg/proto/conversation/conversation.pb.go +++ b/pkg/proto/conversation/conversation.pb.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.29.1 @@ -8,16 +22,14 @@ package conversation import ( context "context" - reflect "reflect" - sync "sync" - + wrapperspb "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/wrapperspb" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - wrapperspb "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/wrapperspb" + reflect "reflect" + sync "sync" ) const ( diff --git a/pkg/proto/errinfo/errinfo.pb.go b/pkg/proto/errinfo/errinfo.pb.go index ae10fe976..44f906d86 100644 --- a/pkg/proto/errinfo/errinfo.pb.go +++ b/pkg/proto/errinfo/errinfo.pb.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.29.1 @@ -7,11 +21,10 @@ package errinfo import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( diff --git a/pkg/proto/friend/friend.pb.go b/pkg/proto/friend/friend.pb.go index c49a13999..5745fcd3c 100644 --- a/pkg/proto/friend/friend.pb.go +++ b/pkg/proto/friend/friend.pb.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.29.1 @@ -8,16 +22,14 @@ package friend import ( context "context" - reflect "reflect" - sync "sync" - + sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" + reflect "reflect" + sync "sync" ) const ( diff --git a/pkg/proto/group/group.pb.go b/pkg/proto/group/group.pb.go index 9541496e2..f4230c794 100644 --- a/pkg/proto/group/group.pb.go +++ b/pkg/proto/group/group.pb.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.29.1 @@ -8,17 +22,15 @@ package group import ( context "context" - reflect "reflect" - sync "sync" - + sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" + wrapperspb "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/wrapperspb" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" - wrapperspb "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/wrapperspb" + reflect "reflect" + sync "sync" ) const ( diff --git a/pkg/proto/msg/msg.pb.go b/pkg/proto/msg/msg.pb.go index 544483074..d11d46de3 100644 --- a/pkg/proto/msg/msg.pb.go +++ b/pkg/proto/msg/msg.pb.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.29.1 @@ -8,16 +22,14 @@ package msg import ( context "context" - reflect "reflect" - sync "sync" - + sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" + reflect "reflect" + sync "sync" ) const ( @@ -2361,6 +2373,488 @@ func (x *GetActiveGroupResp) GetGroups() []*ActiveGroup { return nil } +type SearchMessageReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SendID string `protobuf:"bytes,1,opt,name=sendID,proto3" json:"sendID"` //发送者ID + RecvID string `protobuf:"bytes,2,opt,name=recvID,proto3" json:"recvID"` //接收者ID + MsgType int32 `protobuf:"varint,3,opt,name=msgType,proto3" json:"msgType"` + SendTime string `protobuf:"bytes,4,opt,name=sendTime,proto3" json:"sendTime"` + SessionType int32 `protobuf:"varint,5,opt,name=sessionType,proto3" json:"sessionType"` + Pagination *sdkws.RequestPagination `protobuf:"bytes,6,opt,name=pagination,proto3" json:"pagination"` +} + +func (x *SearchMessageReq) Reset() { + *x = SearchMessageReq{} + if protoimpl.UnsafeEnabled { + mi := &file_msg_msg_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SearchMessageReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchMessageReq) ProtoMessage() {} + +func (x *SearchMessageReq) ProtoReflect() protoreflect.Message { + mi := &file_msg_msg_proto_msgTypes[45] + 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 SearchMessageReq.ProtoReflect.Descriptor instead. +func (*SearchMessageReq) Descriptor() ([]byte, []int) { + return file_msg_msg_proto_rawDescGZIP(), []int{45} +} + +func (x *SearchMessageReq) GetSendID() string { + if x != nil { + return x.SendID + } + return "" +} + +func (x *SearchMessageReq) GetRecvID() string { + if x != nil { + return x.RecvID + } + return "" +} + +func (x *SearchMessageReq) GetMsgType() int32 { + if x != nil { + return x.MsgType + } + return 0 +} + +func (x *SearchMessageReq) GetSendTime() string { + if x != nil { + return x.SendTime + } + return "" +} + +func (x *SearchMessageReq) GetSessionType() int32 { + if x != nil { + return x.SessionType + } + return 0 +} + +func (x *SearchMessageReq) GetPagination() *sdkws.RequestPagination { + if x != nil { + return x.Pagination + } + return nil +} + +type SearchMessageResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChatLogs []*ChatLog `protobuf:"bytes,1,rep,name=chatLogs,proto3" json:"chatLogs"` + ChatLogsNum int32 `protobuf:"varint,2,opt,name=chatLogsNum,proto3" json:"chatLogsNum"` +} + +func (x *SearchMessageResp) Reset() { + *x = SearchMessageResp{} + if protoimpl.UnsafeEnabled { + mi := &file_msg_msg_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SearchMessageResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchMessageResp) ProtoMessage() {} + +func (x *SearchMessageResp) ProtoReflect() protoreflect.Message { + mi := &file_msg_msg_proto_msgTypes[46] + 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 SearchMessageResp.ProtoReflect.Descriptor instead. +func (*SearchMessageResp) Descriptor() ([]byte, []int) { + return file_msg_msg_proto_rawDescGZIP(), []int{46} +} + +func (x *SearchMessageResp) GetChatLogs() []*ChatLog { + if x != nil { + return x.ChatLogs + } + return nil +} + +func (x *SearchMessageResp) GetChatLogsNum() int32 { + if x != nil { + return x.ChatLogsNum + } + return 0 +} + +type ManageMsgReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + RecvID string `protobuf:"bytes,1,opt,name=recvID,proto3" json:"recvID"` + SendID string `protobuf:"bytes,2,opt,name=sendID,proto3" json:"sendID"` + GroupID string `protobuf:"bytes,3,opt,name=groupID,proto3" json:"groupID"` + Seq int64 `protobuf:"varint,4,opt,name=seq,proto3" json:"seq"` + SessionType int32 `protobuf:"varint,5,opt,name=sessionType,proto3" json:"sessionType"` +} + +func (x *ManageMsgReq) Reset() { + *x = ManageMsgReq{} + if protoimpl.UnsafeEnabled { + mi := &file_msg_msg_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ManageMsgReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ManageMsgReq) ProtoMessage() {} + +func (x *ManageMsgReq) ProtoReflect() protoreflect.Message { + mi := &file_msg_msg_proto_msgTypes[47] + 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 ManageMsgReq.ProtoReflect.Descriptor instead. +func (*ManageMsgReq) Descriptor() ([]byte, []int) { + return file_msg_msg_proto_rawDescGZIP(), []int{47} +} + +func (x *ManageMsgReq) GetRecvID() string { + if x != nil { + return x.RecvID + } + return "" +} + +func (x *ManageMsgReq) GetSendID() string { + if x != nil { + return x.SendID + } + return "" +} + +func (x *ManageMsgReq) GetGroupID() string { + if x != nil { + return x.GroupID + } + return "" +} + +func (x *ManageMsgReq) GetSeq() int64 { + if x != nil { + return x.Seq + } + return 0 +} + +func (x *ManageMsgReq) GetSessionType() int32 { + if x != nil { + return x.SessionType + } + return 0 +} + +type ManageMsgResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ManageMsgResp) Reset() { + *x = ManageMsgResp{} + if protoimpl.UnsafeEnabled { + mi := &file_msg_msg_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ManageMsgResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ManageMsgResp) ProtoMessage() {} + +func (x *ManageMsgResp) ProtoReflect() protoreflect.Message { + mi := &file_msg_msg_proto_msgTypes[48] + 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 ManageMsgResp.ProtoReflect.Descriptor instead. +func (*ManageMsgResp) Descriptor() ([]byte, []int) { + return file_msg_msg_proto_rawDescGZIP(), []int{48} +} + +type ChatLog struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ServerMsgID string `protobuf:"bytes,1,opt,name=serverMsgID,proto3" json:"serverMsgID"` + ClientMsgID string `protobuf:"bytes,2,opt,name=clientMsgID,proto3" json:"clientMsgID"` + SendID string `protobuf:"bytes,3,opt,name=sendID,proto3" json:"sendID"` + RecvID string `protobuf:"bytes,4,opt,name=recvID,proto3" json:"recvID"` + GroupID string `protobuf:"bytes,5,opt,name=groupID,proto3" json:"groupID"` + RecvNickname string `protobuf:"bytes,6,opt,name=recvNickname,proto3" json:"recvNickname"` + SenderPlatformID int32 `protobuf:"varint,7,opt,name=senderPlatformID,proto3" json:"senderPlatformID"` + SenderNickname string `protobuf:"bytes,8,opt,name=senderNickname,proto3" json:"senderNickname"` + SenderFaceURL string `protobuf:"bytes,9,opt,name=senderFaceURL,proto3" json:"senderFaceURL"` + GroupName string `protobuf:"bytes,10,opt,name=groupName,proto3" json:"groupName"` + SessionType int32 `protobuf:"varint,11,opt,name=sessionType,proto3" json:"sessionType"` + MsgFrom int32 `protobuf:"varint,12,opt,name=msgFrom,proto3" json:"msgFrom"` + ContentType int32 `protobuf:"varint,13,opt,name=contentType,proto3" json:"contentType"` + Content string `protobuf:"bytes,14,opt,name=content,proto3" json:"content"` + Status int32 `protobuf:"varint,15,opt,name=status,proto3" json:"status"` + SendTime int64 `protobuf:"varint,16,opt,name=sendTime,proto3" json:"sendTime"` + CreateTime int64 `protobuf:"varint,17,opt,name=createTime,proto3" json:"createTime"` + Ex string `protobuf:"bytes,18,opt,name=ex,proto3" json:"ex"` + GroupFaceURL string `protobuf:"bytes,19,opt,name=groupFaceURL,proto3" json:"groupFaceURL"` + GroupMemberCount uint32 `protobuf:"varint,20,opt,name=groupMemberCount,proto3" json:"groupMemberCount"` + Seq int64 `protobuf:"varint,21,opt,name=seq,proto3" json:"seq"` + GroupOwner string `protobuf:"bytes,22,opt,name=groupOwner,proto3" json:"groupOwner"` + GroupType int32 `protobuf:"varint,23,opt,name=groupType,proto3" json:"groupType"` +} + +func (x *ChatLog) Reset() { + *x = ChatLog{} + if protoimpl.UnsafeEnabled { + mi := &file_msg_msg_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChatLog) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChatLog) ProtoMessage() {} + +func (x *ChatLog) ProtoReflect() protoreflect.Message { + mi := &file_msg_msg_proto_msgTypes[49] + 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 ChatLog.ProtoReflect.Descriptor instead. +func (*ChatLog) Descriptor() ([]byte, []int) { + return file_msg_msg_proto_rawDescGZIP(), []int{49} +} + +func (x *ChatLog) GetServerMsgID() string { + if x != nil { + return x.ServerMsgID + } + return "" +} + +func (x *ChatLog) GetClientMsgID() string { + if x != nil { + return x.ClientMsgID + } + return "" +} + +func (x *ChatLog) GetSendID() string { + if x != nil { + return x.SendID + } + return "" +} + +func (x *ChatLog) GetRecvID() string { + if x != nil { + return x.RecvID + } + return "" +} + +func (x *ChatLog) GetGroupID() string { + if x != nil { + return x.GroupID + } + return "" +} + +func (x *ChatLog) GetRecvNickname() string { + if x != nil { + return x.RecvNickname + } + return "" +} + +func (x *ChatLog) GetSenderPlatformID() int32 { + if x != nil { + return x.SenderPlatformID + } + return 0 +} + +func (x *ChatLog) GetSenderNickname() string { + if x != nil { + return x.SenderNickname + } + return "" +} + +func (x *ChatLog) GetSenderFaceURL() string { + if x != nil { + return x.SenderFaceURL + } + return "" +} + +func (x *ChatLog) GetGroupName() string { + if x != nil { + return x.GroupName + } + return "" +} + +func (x *ChatLog) GetSessionType() int32 { + if x != nil { + return x.SessionType + } + return 0 +} + +func (x *ChatLog) GetMsgFrom() int32 { + if x != nil { + return x.MsgFrom + } + return 0 +} + +func (x *ChatLog) GetContentType() int32 { + if x != nil { + return x.ContentType + } + return 0 +} + +func (x *ChatLog) GetContent() string { + if x != nil { + return x.Content + } + return "" +} + +func (x *ChatLog) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *ChatLog) GetSendTime() int64 { + if x != nil { + return x.SendTime + } + return 0 +} + +func (x *ChatLog) GetCreateTime() int64 { + if x != nil { + return x.CreateTime + } + return 0 +} + +func (x *ChatLog) GetEx() string { + if x != nil { + return x.Ex + } + return "" +} + +func (x *ChatLog) GetGroupFaceURL() string { + if x != nil { + return x.GroupFaceURL + } + return "" +} + +func (x *ChatLog) GetGroupMemberCount() uint32 { + if x != nil { + return x.GroupMemberCount + } + return 0 +} + +func (x *ChatLog) GetSeq() int64 { + if x != nil { + return x.Seq + } + return 0 +} + +func (x *ChatLog) GetGroupOwner() string { + if x != nil { + return x.GroupOwner + } + return "" +} + +func (x *ChatLog) GetGroupType() int32 { + if x != nil { + return x.GroupType + } + return 0 +} + var File_msg_msg_proto protoreflect.FileDescriptor var file_msg_msg_proto_rawDesc = []byte{ @@ -2614,125 +3108,212 @@ var file_msg_msg_proto_rawDesc = []byte{ 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x32, 0xa8, 0x0e, 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, 0x70, 0x0a, 0x15, - 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, - 0x61, 0x78, 0x53, 0x65, 0x71, 0x12, 0x2a, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, + 0x38, 0x01, 0x22, 0xe1, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x49, + 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 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, 0x6d, 0x73, 0x67, 0x54, 0x79, + 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, + 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x45, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x2e, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6c, 0x0a, 0x11, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x35, 0x0a, 0x08, 0x63, + 0x68, 0x61, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, + 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, + 0x2e, 0x43, 0x68, 0x61, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x08, 0x63, 0x68, 0x61, 0x74, 0x4c, 0x6f, + 0x67, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x68, 0x61, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x4e, 0x75, + 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x68, 0x61, 0x74, 0x4c, 0x6f, 0x67, + 0x73, 0x4e, 0x75, 0x6d, 0x22, 0x8c, 0x01, 0x0a, 0x0c, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x4d, + 0x73, 0x67, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x76, 0x49, 0x44, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x63, 0x76, 0x49, 0x44, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x65, 0x6e, 0x64, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, + 0x65, 0x6e, 0x64, 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, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x4d, 0x73, 0x67, + 0x52, 0x65, 0x73, 0x70, 0x22, 0xcf, 0x05, 0x0a, 0x07, 0x43, 0x68, 0x61, 0x74, 0x4c, 0x6f, 0x67, + 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x49, 0x44, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4d, 0x73, 0x67, + 0x49, 0x44, 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, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x49, 0x44, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, + 0x72, 0x65, 0x63, 0x76, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, + 0x63, 0x76, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x12, 0x22, + 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x76, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x63, 0x76, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x44, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x73, 0x65, + 0x6e, 0x64, 0x65, 0x72, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x49, 0x44, 0x12, 0x26, + 0x0a, 0x0e, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4e, 0x69, + 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x46, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x46, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x12, 0x1c, 0x0a, 0x09, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x6d, 0x73, 0x67, 0x46, 0x72, 0x6f, 0x6d, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, + 0x73, 0x67, 0x46, 0x72, 0x6f, 0x6d, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x6f, 0x6e, + 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x6e, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, + 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0f, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, + 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65, + 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x54, 0x69, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x65, 0x78, 0x18, 0x12, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x65, 0x78, 0x12, 0x22, 0x0a, 0x0c, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x46, + 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x46, 0x61, 0x63, 0x65, 0x55, 0x52, 0x4c, 0x12, 0x2a, 0x0a, 0x10, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x14, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x71, 0x18, 0x15, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x03, 0x73, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x54, 0x79, 0x70, 0x65, 0x18, 0x17, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x54, 0x79, 0x70, 0x65, 0x32, 0xd0, 0x0f, 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, 0x70, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x71, 0x12, 0x2a, 0x2e, 0x4f, 0x70, 0x65, 0x6e, + 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x47, 0x65, 0x74, + 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x78, 0x53, + 0x65, 0x71, 0x52, 0x65, 0x71, 0x1a, 0x2b, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x71, 0x52, 0x65, - 0x71, 0x1a, 0x2b, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 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, 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, + 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, 0x58, 0x0a, 0x0d, + 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x22, 0x2e, + 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, + 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x71, 0x1a, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4c, 0x0a, 0x09, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x4d, 0x73, 0x67, 0x12, 0x1e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x4d, 0x73, 0x67, + 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x4d, 0x73, 0x67, + 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, 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, - 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, 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, + 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, 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, 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, + 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, 0x73, 0x67, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x26, 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, 0x73, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x61, 0x0a, + 0x10, 0x47, 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, 0x47, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x26, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, + 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x53, + 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x4c, 0x0a, 0x09, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x1e, 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, 0x73, 0x67, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x26, 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, 0x73, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x61, 0x0a, 0x10, 0x47, 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, 0x47, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x64, - 0x4d, 0x73, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x26, 0x2e, 0x4f, - 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, - 0x47, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x4c, 0x0a, 0x09, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4d, 0x73, - 0x67, 0x12, 0x1e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4d, 0x73, 0x67, 0x52, 0x65, - 0x71, 0x1a, 0x1f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4d, 0x73, 0x67, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x5b, 0x0a, 0x0e, 0x4d, 0x61, 0x72, 0x6b, 0x4d, 0x73, 0x67, 0x73, 0x41, 0x73, - 0x52, 0x65, 0x61, 0x64, 0x12, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x4d, 0x73, 0x67, 0x73, - 0x41, 0x73, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x4d, 0x61, 0x72, - 0x6b, 0x4d, 0x73, 0x67, 0x73, 0x41, 0x73, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x73, 0x0a, 0x16, 0x4d, 0x61, 0x72, 0x6b, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x41, 0x73, 0x52, 0x65, 0x61, 0x64, 0x12, 0x2b, 0x2e, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x4d, 0x61, 0x72, - 0x6b, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x73, 0x52, - 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x2c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x43, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x73, 0x52, 0x65, 0x61, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x7c, 0x0a, 0x19, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x52, 0x65, 0x61, 0x64, 0x53, 0x65, - 0x71, 0x12, 0x2e, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x52, 0x65, 0x61, 0x64, 0x53, 0x65, 0x71, 0x52, 0x65, - 0x71, 0x1a, 0x2f, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x52, 0x65, 0x61, 0x64, 0x53, 0x65, 0x71, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x91, 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, + 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, + 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, + 0x2e, 0x52, 0x65, 0x76, 0x6f, 0x6b, 0x65, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5b, + 0x0a, 0x0e, 0x4d, 0x61, 0x72, 0x6b, 0x4d, 0x73, 0x67, 0x73, 0x41, 0x73, 0x52, 0x65, 0x61, 0x64, + 0x12, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, + 0x6d, 0x73, 0x67, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x4d, 0x73, 0x67, 0x73, 0x41, 0x73, 0x52, 0x65, + 0x61, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x4d, 0x73, 0x67, + 0x73, 0x41, 0x73, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x73, 0x0a, 0x16, 0x4d, + 0x61, 0x72, 0x6b, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, + 0x73, 0x52, 0x65, 0x61, 0x64, 0x12, 0x2b, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x43, 0x6f, 0x6e, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x73, 0x52, 0x65, 0x61, 0x64, 0x52, + 0x65, 0x71, 0x1a, 0x2c, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, + 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x73, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x7c, 0x0a, 0x19, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x73, 0x52, 0x65, 0x61, 0x64, 0x53, 0x65, 0x71, 0x12, 0x2e, 0x2e, + 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, + 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x48, 0x61, 0x73, 0x52, 0x65, 0x61, 0x64, 0x53, 0x65, 0x71, 0x52, 0x65, 0x71, 0x1a, 0x2f, 0x2e, + 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, + 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x48, 0x61, 0x73, 0x52, 0x65, 0x61, 0x64, 0x53, 0x65, 0x71, 0x52, 0x65, 0x73, 0x70, 0x12, 0x91, + 0x01, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x48, 0x61, 0x73, 0x52, 0x65, 0x61, 0x64, 0x41, 0x6e, 0x64, 0x4d, 0x61, 0x78, + 0x53, 0x65, 0x71, 0x12, 0x35, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x61, 0x73, 0x52, 0x65, 0x61, 0x64, 0x41, 0x6e, - 0x64, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x71, 0x12, 0x35, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, - 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x61, 0x73, 0x52, 0x65, - 0x61, 0x64, 0x41, 0x6e, 0x64, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x71, 0x52, 0x65, 0x71, 0x1a, 0x36, - 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, - 0x67, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x48, 0x61, 0x73, 0x52, 0x65, 0x61, 0x64, 0x41, 0x6e, 0x64, 0x4d, 0x61, 0x78, 0x53, - 0x65, 0x71, 0x52, 0x65, 0x73, 0x70, 0x12, 0x58, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, - 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, + 0x64, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x71, 0x52, 0x65, 0x71, 0x1a, 0x36, 0x2e, 0x4f, 0x70, 0x65, + 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x47, 0x65, + 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x61, + 0x73, 0x52, 0x65, 0x61, 0x64, 0x41, 0x6e, 0x64, 0x4d, 0x61, 0x78, 0x53, 0x65, 0x71, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x58, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, + 0x73, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x4f, 0x70, - 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x47, - 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x5b, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x12, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x42, 0x33, 0x5a, - 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4f, 0x70, 0x65, 0x6e, - 0x49, 0x4d, 0x53, 0x44, 0x4b, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x2d, 0x49, 0x4d, 0x2d, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6d, - 0x73, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x69, 0x76, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5b, 0x0a, 0x0e, + 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x23, + 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x6d, 0x73, + 0x67, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x52, 0x65, 0x71, 0x1a, 0x24, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x2e, 0x6d, 0x73, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x44, + 0x4b, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x2d, 0x49, 0x4d, 0x2d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6d, 0x73, 0x67, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2747,7 +3328,7 @@ func file_msg_msg_proto_rawDescGZIP() []byte { return file_msg_msg_proto_rawDescData } -var file_msg_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 48) +var file_msg_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 53) var file_msg_msg_proto_goTypes = []interface{}{ (*MsgDataToMQ)(nil), // 0: OpenIMServer.msg.MsgDataToMQ (*MsgDataToDB)(nil), // 1: OpenIMServer.msg.MsgDataToDB @@ -2794,79 +3375,90 @@ var file_msg_msg_proto_goTypes = []interface{}{ (*GetActiveGroupReq)(nil), // 42: OpenIMServer.msg.GetActiveGroupReq (*ActiveGroup)(nil), // 43: OpenIMServer.msg.ActiveGroup (*GetActiveGroupResp)(nil), // 44: OpenIMServer.msg.GetActiveGroupResp - nil, // 45: OpenIMServer.msg.GetConversationsHasReadAndMaxSeqResp.SeqsEntry - nil, // 46: OpenIMServer.msg.GetActiveUserResp.DateCountEntry - nil, // 47: OpenIMServer.msg.GetActiveGroupResp.DateCountEntry - (*sdkws.MsgData)(nil), // 48: OpenIMServer.sdkws.MsgData - (*sdkws.RequestPagination)(nil), // 49: OpenIMServer.sdkws.RequestPagination - (*sdkws.UserInfo)(nil), // 50: OpenIMServer.sdkws.UserInfo - (*sdkws.GroupInfo)(nil), // 51: OpenIMServer.sdkws.GroupInfo - (*sdkws.GetMaxSeqReq)(nil), // 52: OpenIMServer.sdkws.GetMaxSeqReq - (*sdkws.PullMessageBySeqsReq)(nil), // 53: OpenIMServer.sdkws.PullMessageBySeqsReq - (*sdkws.GetMaxSeqResp)(nil), // 54: OpenIMServer.sdkws.GetMaxSeqResp - (*sdkws.PullMessageBySeqsResp)(nil), // 55: OpenIMServer.sdkws.PullMessageBySeqsResp + (*SearchMessageReq)(nil), // 45: OpenIMServer.msg.SearchMessageReq + (*SearchMessageResp)(nil), // 46: OpenIMServer.msg.SearchMessageResp + (*ManageMsgReq)(nil), // 47: OpenIMServer.msg.manageMsgReq + (*ManageMsgResp)(nil), // 48: OpenIMServer.msg.manageMsgResp + (*ChatLog)(nil), // 49: OpenIMServer.msg.ChatLog + nil, // 50: OpenIMServer.msg.GetConversationsHasReadAndMaxSeqResp.SeqsEntry + nil, // 51: OpenIMServer.msg.GetActiveUserResp.DateCountEntry + nil, // 52: OpenIMServer.msg.GetActiveGroupResp.DateCountEntry + (*sdkws.MsgData)(nil), // 53: OpenIMServer.sdkws.MsgData + (*sdkws.RequestPagination)(nil), // 54: OpenIMServer.sdkws.RequestPagination + (*sdkws.UserInfo)(nil), // 55: OpenIMServer.sdkws.UserInfo + (*sdkws.GroupInfo)(nil), // 56: OpenIMServer.sdkws.GroupInfo + (*sdkws.GetMaxSeqReq)(nil), // 57: OpenIMServer.sdkws.GetMaxSeqReq + (*sdkws.PullMessageBySeqsReq)(nil), // 58: OpenIMServer.sdkws.PullMessageBySeqsReq + (*sdkws.GetMaxSeqResp)(nil), // 59: OpenIMServer.sdkws.GetMaxSeqResp + (*sdkws.PullMessageBySeqsResp)(nil), // 60: OpenIMServer.sdkws.PullMessageBySeqsResp } var file_msg_msg_proto_depIdxs = []int32{ - 48, // 0: OpenIMServer.msg.MsgDataToMQ.msgData:type_name -> OpenIMServer.sdkws.MsgData - 48, // 1: OpenIMServer.msg.MsgDataToDB.msgData:type_name -> OpenIMServer.sdkws.MsgData - 48, // 2: OpenIMServer.msg.PushMsgDataToMQ.msgData:type_name -> OpenIMServer.sdkws.MsgData - 48, // 3: OpenIMServer.msg.MsgDataToMongoByMQ.msgData:type_name -> OpenIMServer.sdkws.MsgData - 48, // 4: OpenIMServer.msg.SendMsgReq.msgData:type_name -> OpenIMServer.sdkws.MsgData - 48, // 5: OpenIMServer.msg.MsgDataToModifyByMQ.messages:type_name -> OpenIMServer.sdkws.MsgData + 53, // 0: OpenIMServer.msg.MsgDataToMQ.msgData:type_name -> OpenIMServer.sdkws.MsgData + 53, // 1: OpenIMServer.msg.MsgDataToDB.msgData:type_name -> OpenIMServer.sdkws.MsgData + 53, // 2: OpenIMServer.msg.PushMsgDataToMQ.msgData:type_name -> OpenIMServer.sdkws.MsgData + 53, // 3: OpenIMServer.msg.MsgDataToMongoByMQ.msgData:type_name -> OpenIMServer.sdkws.MsgData + 53, // 4: OpenIMServer.msg.SendMsgReq.msgData:type_name -> OpenIMServer.sdkws.MsgData + 53, // 5: OpenIMServer.msg.MsgDataToModifyByMQ.messages:type_name -> OpenIMServer.sdkws.MsgData 23, // 6: OpenIMServer.msg.ClearConversationsMsgReq.deleteSyncOpt:type_name -> OpenIMServer.msg.DeleteSyncOpt 23, // 7: OpenIMServer.msg.UserClearAllMsgReq.deleteSyncOpt:type_name -> OpenIMServer.msg.DeleteSyncOpt 23, // 8: OpenIMServer.msg.DeleteMsgsReq.deleteSyncOpt:type_name -> OpenIMServer.msg.DeleteSyncOpt - 45, // 9: OpenIMServer.msg.GetConversationsHasReadAndMaxSeqResp.seqs:type_name -> OpenIMServer.msg.GetConversationsHasReadAndMaxSeqResp.SeqsEntry - 49, // 10: OpenIMServer.msg.GetActiveUserReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination - 50, // 11: OpenIMServer.msg.ActiveUser.user:type_name -> OpenIMServer.sdkws.UserInfo - 46, // 12: OpenIMServer.msg.GetActiveUserResp.dateCount:type_name -> OpenIMServer.msg.GetActiveUserResp.DateCountEntry + 50, // 9: OpenIMServer.msg.GetConversationsHasReadAndMaxSeqResp.seqs:type_name -> OpenIMServer.msg.GetConversationsHasReadAndMaxSeqResp.SeqsEntry + 54, // 10: OpenIMServer.msg.GetActiveUserReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination + 55, // 11: OpenIMServer.msg.ActiveUser.user:type_name -> OpenIMServer.sdkws.UserInfo + 51, // 12: OpenIMServer.msg.GetActiveUserResp.dateCount:type_name -> OpenIMServer.msg.GetActiveUserResp.DateCountEntry 40, // 13: OpenIMServer.msg.GetActiveUserResp.users:type_name -> OpenIMServer.msg.ActiveUser - 49, // 14: OpenIMServer.msg.GetActiveGroupReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination - 51, // 15: OpenIMServer.msg.ActiveGroup.group:type_name -> OpenIMServer.sdkws.GroupInfo - 47, // 16: OpenIMServer.msg.GetActiveGroupResp.dateCount:type_name -> OpenIMServer.msg.GetActiveGroupResp.DateCountEntry + 54, // 14: OpenIMServer.msg.GetActiveGroupReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination + 56, // 15: OpenIMServer.msg.ActiveGroup.group:type_name -> OpenIMServer.sdkws.GroupInfo + 52, // 16: OpenIMServer.msg.GetActiveGroupResp.dateCount:type_name -> OpenIMServer.msg.GetActiveGroupResp.DateCountEntry 43, // 17: OpenIMServer.msg.GetActiveGroupResp.groups:type_name -> OpenIMServer.msg.ActiveGroup - 37, // 18: OpenIMServer.msg.GetConversationsHasReadAndMaxSeqResp.SeqsEntry.value:type_name -> OpenIMServer.msg.Seqs - 52, // 19: OpenIMServer.msg.msg.GetMaxSeq:input_type -> OpenIMServer.sdkws.GetMaxSeqReq - 34, // 20: OpenIMServer.msg.msg.GetConversationMaxSeq:input_type -> OpenIMServer.msg.GetConversationMaxSeqReq - 53, // 21: OpenIMServer.msg.msg.PullMessageBySeqs:input_type -> OpenIMServer.sdkws.PullMessageBySeqsReq - 6, // 22: OpenIMServer.msg.msg.SendMsg:input_type -> OpenIMServer.msg.SendMsgReq - 24, // 23: OpenIMServer.msg.msg.ClearConversationsMsg:input_type -> OpenIMServer.msg.ClearConversationsMsgReq - 26, // 24: OpenIMServer.msg.msg.UserClearAllMsg:input_type -> OpenIMServer.msg.UserClearAllMsgReq - 28, // 25: OpenIMServer.msg.msg.DeleteMsgs:input_type -> OpenIMServer.msg.DeleteMsgsReq - 32, // 26: OpenIMServer.msg.msg.DeleteMsgPhysicalBySeq:input_type -> OpenIMServer.msg.DeleteMsgPhysicalBySeqReq - 30, // 27: OpenIMServer.msg.msg.DeleteMsgPhysical:input_type -> OpenIMServer.msg.DeleteMsgPhysicalReq - 8, // 28: OpenIMServer.msg.msg.SetSendMsgStatus:input_type -> OpenIMServer.msg.SetSendMsgStatusReq - 10, // 29: OpenIMServer.msg.msg.GetSendMsgStatus:input_type -> OpenIMServer.msg.GetSendMsgStatusReq - 15, // 30: OpenIMServer.msg.msg.RevokeMsg:input_type -> OpenIMServer.msg.RevokeMsgReq - 17, // 31: OpenIMServer.msg.msg.MarkMsgsAsRead:input_type -> OpenIMServer.msg.MarkMsgsAsReadReq - 19, // 32: OpenIMServer.msg.msg.MarkConversationAsRead:input_type -> OpenIMServer.msg.MarkConversationAsReadReq - 21, // 33: OpenIMServer.msg.msg.SetConversationHasReadSeq:input_type -> OpenIMServer.msg.SetConversationHasReadSeqReq - 36, // 34: OpenIMServer.msg.msg.GetConversationsHasReadAndMaxSeq:input_type -> OpenIMServer.msg.GetConversationsHasReadAndMaxSeqReq - 39, // 35: OpenIMServer.msg.msg.GetActiveUser:input_type -> OpenIMServer.msg.GetActiveUserReq - 42, // 36: OpenIMServer.msg.msg.GetActiveGroup:input_type -> OpenIMServer.msg.GetActiveGroupReq - 54, // 37: OpenIMServer.msg.msg.GetMaxSeq:output_type -> OpenIMServer.sdkws.GetMaxSeqResp - 35, // 38: OpenIMServer.msg.msg.GetConversationMaxSeq:output_type -> OpenIMServer.msg.GetConversationMaxSeqResp - 55, // 39: OpenIMServer.msg.msg.PullMessageBySeqs:output_type -> OpenIMServer.sdkws.PullMessageBySeqsResp - 7, // 40: OpenIMServer.msg.msg.SendMsg:output_type -> OpenIMServer.msg.SendMsgResp - 25, // 41: OpenIMServer.msg.msg.ClearConversationsMsg:output_type -> OpenIMServer.msg.ClearConversationsMsgResp - 27, // 42: OpenIMServer.msg.msg.UserClearAllMsg:output_type -> OpenIMServer.msg.UserClearAllMsgResp - 29, // 43: OpenIMServer.msg.msg.DeleteMsgs:output_type -> OpenIMServer.msg.DeleteMsgsResp - 33, // 44: OpenIMServer.msg.msg.DeleteMsgPhysicalBySeq:output_type -> OpenIMServer.msg.DeleteMsgPhysicalBySeqResp - 31, // 45: OpenIMServer.msg.msg.DeleteMsgPhysical:output_type -> OpenIMServer.msg.DeleteMsgPhysicalResp - 9, // 46: OpenIMServer.msg.msg.SetSendMsgStatus:output_type -> OpenIMServer.msg.SetSendMsgStatusResp - 11, // 47: OpenIMServer.msg.msg.GetSendMsgStatus:output_type -> OpenIMServer.msg.GetSendMsgStatusResp - 16, // 48: OpenIMServer.msg.msg.RevokeMsg:output_type -> OpenIMServer.msg.RevokeMsgResp - 18, // 49: OpenIMServer.msg.msg.MarkMsgsAsRead:output_type -> OpenIMServer.msg.MarkMsgsAsReadResp - 20, // 50: OpenIMServer.msg.msg.MarkConversationAsRead:output_type -> OpenIMServer.msg.MarkConversationAsReadResp - 22, // 51: OpenIMServer.msg.msg.SetConversationHasReadSeq:output_type -> OpenIMServer.msg.SetConversationHasReadSeqResp - 38, // 52: OpenIMServer.msg.msg.GetConversationsHasReadAndMaxSeq:output_type -> OpenIMServer.msg.GetConversationsHasReadAndMaxSeqResp - 41, // 53: OpenIMServer.msg.msg.GetActiveUser:output_type -> OpenIMServer.msg.GetActiveUserResp - 44, // 54: OpenIMServer.msg.msg.GetActiveGroup:output_type -> OpenIMServer.msg.GetActiveGroupResp - 37, // [37:55] is the sub-list for method output_type - 19, // [19:37] is the sub-list for method input_type - 19, // [19:19] is the sub-list for extension type_name - 19, // [19:19] is the sub-list for extension extendee - 0, // [0:19] is the sub-list for field type_name + 54, // 18: OpenIMServer.msg.SearchMessageReq.pagination:type_name -> OpenIMServer.sdkws.RequestPagination + 49, // 19: OpenIMServer.msg.SearchMessageResp.chatLogs:type_name -> OpenIMServer.msg.ChatLog + 37, // 20: OpenIMServer.msg.GetConversationsHasReadAndMaxSeqResp.SeqsEntry.value:type_name -> OpenIMServer.msg.Seqs + 57, // 21: OpenIMServer.msg.msg.GetMaxSeq:input_type -> OpenIMServer.sdkws.GetMaxSeqReq + 34, // 22: OpenIMServer.msg.msg.GetConversationMaxSeq:input_type -> OpenIMServer.msg.GetConversationMaxSeqReq + 58, // 23: OpenIMServer.msg.msg.PullMessageBySeqs:input_type -> OpenIMServer.sdkws.PullMessageBySeqsReq + 45, // 24: OpenIMServer.msg.msg.SearchMessage:input_type -> OpenIMServer.msg.SearchMessageReq + 47, // 25: OpenIMServer.msg.msg.ManageMsg:input_type -> OpenIMServer.msg.manageMsgReq + 6, // 26: OpenIMServer.msg.msg.SendMsg:input_type -> OpenIMServer.msg.SendMsgReq + 24, // 27: OpenIMServer.msg.msg.ClearConversationsMsg:input_type -> OpenIMServer.msg.ClearConversationsMsgReq + 26, // 28: OpenIMServer.msg.msg.UserClearAllMsg:input_type -> OpenIMServer.msg.UserClearAllMsgReq + 28, // 29: OpenIMServer.msg.msg.DeleteMsgs:input_type -> OpenIMServer.msg.DeleteMsgsReq + 32, // 30: OpenIMServer.msg.msg.DeleteMsgPhysicalBySeq:input_type -> OpenIMServer.msg.DeleteMsgPhysicalBySeqReq + 30, // 31: OpenIMServer.msg.msg.DeleteMsgPhysical:input_type -> OpenIMServer.msg.DeleteMsgPhysicalReq + 8, // 32: OpenIMServer.msg.msg.SetSendMsgStatus:input_type -> OpenIMServer.msg.SetSendMsgStatusReq + 10, // 33: OpenIMServer.msg.msg.GetSendMsgStatus:input_type -> OpenIMServer.msg.GetSendMsgStatusReq + 15, // 34: OpenIMServer.msg.msg.RevokeMsg:input_type -> OpenIMServer.msg.RevokeMsgReq + 17, // 35: OpenIMServer.msg.msg.MarkMsgsAsRead:input_type -> OpenIMServer.msg.MarkMsgsAsReadReq + 19, // 36: OpenIMServer.msg.msg.MarkConversationAsRead:input_type -> OpenIMServer.msg.MarkConversationAsReadReq + 21, // 37: OpenIMServer.msg.msg.SetConversationHasReadSeq:input_type -> OpenIMServer.msg.SetConversationHasReadSeqReq + 36, // 38: OpenIMServer.msg.msg.GetConversationsHasReadAndMaxSeq:input_type -> OpenIMServer.msg.GetConversationsHasReadAndMaxSeqReq + 39, // 39: OpenIMServer.msg.msg.GetActiveUser:input_type -> OpenIMServer.msg.GetActiveUserReq + 42, // 40: OpenIMServer.msg.msg.GetActiveGroup:input_type -> OpenIMServer.msg.GetActiveGroupReq + 59, // 41: OpenIMServer.msg.msg.GetMaxSeq:output_type -> OpenIMServer.sdkws.GetMaxSeqResp + 35, // 42: OpenIMServer.msg.msg.GetConversationMaxSeq:output_type -> OpenIMServer.msg.GetConversationMaxSeqResp + 60, // 43: OpenIMServer.msg.msg.PullMessageBySeqs:output_type -> OpenIMServer.sdkws.PullMessageBySeqsResp + 46, // 44: OpenIMServer.msg.msg.SearchMessage:output_type -> OpenIMServer.msg.SearchMessageResp + 48, // 45: OpenIMServer.msg.msg.ManageMsg:output_type -> OpenIMServer.msg.manageMsgResp + 7, // 46: OpenIMServer.msg.msg.SendMsg:output_type -> OpenIMServer.msg.SendMsgResp + 25, // 47: OpenIMServer.msg.msg.ClearConversationsMsg:output_type -> OpenIMServer.msg.ClearConversationsMsgResp + 27, // 48: OpenIMServer.msg.msg.UserClearAllMsg:output_type -> OpenIMServer.msg.UserClearAllMsgResp + 29, // 49: OpenIMServer.msg.msg.DeleteMsgs:output_type -> OpenIMServer.msg.DeleteMsgsResp + 33, // 50: OpenIMServer.msg.msg.DeleteMsgPhysicalBySeq:output_type -> OpenIMServer.msg.DeleteMsgPhysicalBySeqResp + 31, // 51: OpenIMServer.msg.msg.DeleteMsgPhysical:output_type -> OpenIMServer.msg.DeleteMsgPhysicalResp + 9, // 52: OpenIMServer.msg.msg.SetSendMsgStatus:output_type -> OpenIMServer.msg.SetSendMsgStatusResp + 11, // 53: OpenIMServer.msg.msg.GetSendMsgStatus:output_type -> OpenIMServer.msg.GetSendMsgStatusResp + 16, // 54: OpenIMServer.msg.msg.RevokeMsg:output_type -> OpenIMServer.msg.RevokeMsgResp + 18, // 55: OpenIMServer.msg.msg.MarkMsgsAsRead:output_type -> OpenIMServer.msg.MarkMsgsAsReadResp + 20, // 56: OpenIMServer.msg.msg.MarkConversationAsRead:output_type -> OpenIMServer.msg.MarkConversationAsReadResp + 22, // 57: OpenIMServer.msg.msg.SetConversationHasReadSeq:output_type -> OpenIMServer.msg.SetConversationHasReadSeqResp + 38, // 58: OpenIMServer.msg.msg.GetConversationsHasReadAndMaxSeq:output_type -> OpenIMServer.msg.GetConversationsHasReadAndMaxSeqResp + 41, // 59: OpenIMServer.msg.msg.GetActiveUser:output_type -> OpenIMServer.msg.GetActiveUserResp + 44, // 60: OpenIMServer.msg.msg.GetActiveGroup:output_type -> OpenIMServer.msg.GetActiveGroupResp + 41, // [41:61] is the sub-list for method output_type + 21, // [21:41] is the sub-list for method input_type + 21, // [21:21] is the sub-list for extension type_name + 21, // [21:21] is the sub-list for extension extendee + 0, // [0:21] is the sub-list for field type_name } func init() { file_msg_msg_proto_init() } @@ -3415,6 +4007,66 @@ func file_msg_msg_proto_init() { return nil } } + file_msg_msg_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SearchMessageReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_msg_msg_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SearchMessageResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_msg_msg_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ManageMsgReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_msg_msg_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ManageMsgResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_msg_msg_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChatLog); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -3422,7 +4074,7 @@ func file_msg_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_msg_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 48, + NumMessages: 53, NumExtensions: 0, NumServices: 1, }, @@ -3453,6 +4105,8 @@ type MsgClient interface { GetConversationMaxSeq(ctx context.Context, in *GetConversationMaxSeqReq, opts ...grpc.CallOption) (*GetConversationMaxSeqResp, error) // 拉取历史消息(包括用户的,以及指定群组的) PullMessageBySeqs(ctx context.Context, in *sdkws.PullMessageBySeqsReq, opts ...grpc.CallOption) (*sdkws.PullMessageBySeqsResp, error) + SearchMessage(ctx context.Context, in *SearchMessageReq, opts ...grpc.CallOption) (*SearchMessageResp, error) + ManageMsg(ctx context.Context, in *ManageMsgReq, opts ...grpc.CallOption) (*ManageMsgResp, error) // 发送消息 SendMsg(ctx context.Context, in *SendMsgReq, opts ...grpc.CallOption) (*SendMsgResp, error) // 全量清空指定会话消息 重置min seq 比最大seq大1 @@ -3514,6 +4168,24 @@ func (c *msgClient) PullMessageBySeqs(ctx context.Context, in *sdkws.PullMessage return out, nil } +func (c *msgClient) SearchMessage(ctx context.Context, in *SearchMessageReq, opts ...grpc.CallOption) (*SearchMessageResp, error) { + out := new(SearchMessageResp) + err := c.cc.Invoke(ctx, "/OpenIMServer.msg.msg/SearchMessage", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) ManageMsg(ctx context.Context, in *ManageMsgReq, opts ...grpc.CallOption) (*ManageMsgResp, error) { + out := new(ManageMsgResp) + err := c.cc.Invoke(ctx, "/OpenIMServer.msg.msg/ManageMsg", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) SendMsg(ctx context.Context, in *SendMsgReq, opts ...grpc.CallOption) (*SendMsgResp, error) { out := new(SendMsgResp) err := c.cc.Invoke(ctx, "/OpenIMServer.msg.msg/SendMsg", in, out, opts...) @@ -3656,6 +4328,8 @@ type MsgServer interface { GetConversationMaxSeq(context.Context, *GetConversationMaxSeqReq) (*GetConversationMaxSeqResp, error) // 拉取历史消息(包括用户的,以及指定群组的) PullMessageBySeqs(context.Context, *sdkws.PullMessageBySeqsReq) (*sdkws.PullMessageBySeqsResp, error) + SearchMessage(context.Context, *SearchMessageReq) (*SearchMessageResp, error) + ManageMsg(context.Context, *ManageMsgReq) (*ManageMsgResp, error) // 发送消息 SendMsg(context.Context, *SendMsgReq) (*SendMsgResp, error) // 全量清空指定会话消息 重置min seq 比最大seq大1 @@ -3695,6 +4369,12 @@ func (*UnimplementedMsgServer) GetConversationMaxSeq(context.Context, *GetConver func (*UnimplementedMsgServer) PullMessageBySeqs(context.Context, *sdkws.PullMessageBySeqsReq) (*sdkws.PullMessageBySeqsResp, error) { return nil, status.Errorf(codes.Unimplemented, "method PullMessageBySeqs not implemented") } +func (*UnimplementedMsgServer) SearchMessage(context.Context, *SearchMessageReq) (*SearchMessageResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method SearchMessage not implemented") +} +func (*UnimplementedMsgServer) ManageMsg(context.Context, *ManageMsgReq) (*ManageMsgResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method ManageMsg not implemented") +} func (*UnimplementedMsgServer) SendMsg(context.Context, *SendMsgReq) (*SendMsgResp, error) { return nil, status.Errorf(codes.Unimplemented, "method SendMsg not implemented") } @@ -3799,6 +4479,42 @@ func _Msg_PullMessageBySeqs_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _Msg_SearchMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SearchMessageReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SearchMessage(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMServer.msg.msg/SearchMessage", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SearchMessage(ctx, req.(*SearchMessageReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_ManageMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ManageMsgReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ManageMsg(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/OpenIMServer.msg.msg/ManageMsg", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ManageMsg(ctx, req.(*ManageMsgReq)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_SendMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SendMsgReq) if err := dec(in); err != nil { @@ -4085,6 +4801,14 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "PullMessageBySeqs", Handler: _Msg_PullMessageBySeqs_Handler, }, + { + MethodName: "SearchMessage", + Handler: _Msg_SearchMessage_Handler, + }, + { + MethodName: "ManageMsg", + Handler: _Msg_ManageMsg_Handler, + }, { MethodName: "SendMsg", Handler: _Msg_SendMsg_Handler, diff --git a/pkg/proto/msg/msg.proto b/pkg/proto/msg/msg.proto index d67195d44..ba9852740 100644 --- a/pkg/proto/msg/msg.proto +++ b/pkg/proto/msg/msg.proto @@ -232,12 +232,66 @@ message GetActiveGroupResp { repeated ActiveGroup groups = 4; } +message SearchMessageReq{ + string sendID=1;//发送者ID + string recvID=2;//接收者ID + int32 msgType=3; + string sendTime=4; + int32 sessionType=5; + sdkws.RequestPagination pagination = 6; +} + +message SearchMessageResp{ + repeated ChatLog chatLogs=1; + int32 chatLogsNum = 2; +} + +message manageMsgReq{ + string recvID=1; + string sendID=2; + string groupID=3; + int64 seq=4; + int32 sessionType=5; +} + +message manageMsgResp{ +} + +message ChatLog { + string serverMsgID = 1; + string clientMsgID = 2; + string sendID = 3; + string recvID = 4; + string groupID = 5; + string recvNickname = 6; + int32 senderPlatformID = 7; + string senderNickname = 8; + string senderFaceURL = 9; + string groupName = 10; + int32 sessionType = 11; + int32 msgFrom = 12; + int32 contentType = 13; + string content = 14; + int32 status = 15; + int64 sendTime = 16; + int64 createTime = 17; + string ex = 18; + string groupFaceURL=19; + uint32 groupMemberCount=20; + int64 seq=21; + string groupOwner=22; + int32 groupType=23; +} + + service msg { //获取最小最大seq(包括用户的,以及指定群组的) rpc GetMaxSeq(sdkws.GetMaxSeqReq) returns(sdkws.GetMaxSeqResp); rpc GetConversationMaxSeq(GetConversationMaxSeqReq) returns(GetConversationMaxSeqResp); //拉取历史消息(包括用户的,以及指定群组的) rpc PullMessageBySeqs(sdkws.PullMessageBySeqsReq) returns(sdkws.PullMessageBySeqsResp); + rpc SearchMessage(SearchMessageReq) returns(SearchMessageResp); + rpc ManageMsg(manageMsgReq) returns (manageMsgResp); //发送消息 rpc SendMsg(SendMsgReq) returns(SendMsgResp); diff --git a/pkg/proto/msggateway/msggateway.pb.go b/pkg/proto/msggateway/msggateway.pb.go index 6d3aa576a..d922d98b4 100644 --- a/pkg/proto/msggateway/msggateway.pb.go +++ b/pkg/proto/msggateway/msggateway.pb.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.29.1 @@ -8,16 +22,14 @@ package msggateway import ( context "context" - reflect "reflect" - sync "sync" - + sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" + reflect "reflect" + sync "sync" ) const ( diff --git a/pkg/proto/push/push.pb.go b/pkg/proto/push/push.pb.go index f9ef4a08a..1dc9d2ab9 100644 --- a/pkg/proto/push/push.pb.go +++ b/pkg/proto/push/push.pb.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.29.1 @@ -8,16 +22,14 @@ package push import ( context "context" - reflect "reflect" - sync "sync" - + sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" + reflect "reflect" + sync "sync" ) const ( diff --git a/pkg/proto/sdkws/sdkws.pb.go b/pkg/proto/sdkws/sdkws.pb.go index f2038ee5a..b45d46d4c 100644 --- a/pkg/proto/sdkws/sdkws.pb.go +++ b/pkg/proto/sdkws/sdkws.pb.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.29.1 @@ -7,13 +21,11 @@ package sdkws import ( - reflect "reflect" - sync "sync" - + wrapperspb "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/wrapperspb" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - wrapperspb "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/wrapperspb" + reflect "reflect" + sync "sync" ) const ( diff --git a/pkg/proto/statistics/statistics.pb.go b/pkg/proto/statistics/statistics.pb.go index 092f67b52..5660758f9 100644 --- a/pkg/proto/statistics/statistics.pb.go +++ b/pkg/proto/statistics/statistics.pb.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.29.1 @@ -7,10 +21,9 @@ package statistics import ( - reflect "reflect" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" ) const ( diff --git a/pkg/proto/third/third.pb.go b/pkg/proto/third/third.pb.go index 1ba6c3a05..155b5f7cc 100644 --- a/pkg/proto/third/third.pb.go +++ b/pkg/proto/third/third.pb.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.29.1 @@ -8,14 +22,13 @@ package third import ( context "context" - reflect "reflect" - sync "sync" - grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( diff --git a/pkg/proto/user/user.pb.go b/pkg/proto/user/user.pb.go index c96acb4a4..5046505db 100644 --- a/pkg/proto/user/user.pb.go +++ b/pkg/proto/user/user.pb.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.29.1 @@ -8,17 +22,15 @@ package user import ( context "context" - reflect "reflect" - sync "sync" - + conversation "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation" + sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - - conversation "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation" - sdkws "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws" + reflect "reflect" + sync "sync" ) const ( diff --git a/pkg/proto/wrapperspb/wrapperspb.pb.go b/pkg/proto/wrapperspb/wrapperspb.pb.go index 2bb8b39db..9678bb2a0 100644 --- a/pkg/proto/wrapperspb/wrapperspb.pb.go +++ b/pkg/proto/wrapperspb/wrapperspb.pb.go @@ -1,3 +1,17 @@ +// Copyright © 2023 OpenIM. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.29.1 @@ -7,11 +21,10 @@ package wrapperspb import ( - reflect "reflect" - sync "sync" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) const ( diff --git a/pkg/rpcclient/msg.go b/pkg/rpcclient/msg.go index 9e7b481cd..df7e24194 100644 --- a/pkg/rpcclient/msg.go +++ b/pkg/rpcclient/msg.go @@ -3,6 +3,7 @@ package rpcclient import ( "context" "encoding/json" + "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/user" "google.golang.org/grpc" "google.golang.org/protobuf/proto" @@ -283,3 +284,16 @@ func (s *NotificationSender) Notification( ) error { return s.NotificationWithSesstionType(ctx, sendID, recvID, contentType, s.sessionTypeConf[contentType], m, opts...) } + +func (m *Message) GetAllUserID(ctx context.Context, req *user.GetAllUserIDReq) (*user.GetAllUserIDResp, error) { + conn, err := m.discov.GetConn(context.Background(), config.Config.RpcRegisterName.OpenImMsgName) + if err != nil { + panic(err) + } + client := user.NewUserClient(conn) + resp, err := client.GetAllUserID(ctx, req) + if err != nil { + return nil, err + } + return resp, nil +} diff --git a/pkg/rpcclient/third.go b/pkg/rpcclient/third.go index 4f57cbd69..578586ca3 100644 --- a/pkg/rpcclient/third.go +++ b/pkg/rpcclient/third.go @@ -16,6 +16,9 @@ package rpcclient import ( "context" + "github.com/minio/minio-go/v7" + "github.com/minio/minio-go/v7/pkg/credentials" + "net/url" "google.golang.org/grpc" @@ -25,9 +28,10 @@ import ( ) type Third struct { - conn grpc.ClientConnInterface - Client third.ThirdClient - discov discoveryregistry.SvcDiscoveryRegistry + conn grpc.ClientConnInterface + Client third.ThirdClient + discov discoveryregistry.SvcDiscoveryRegistry + MinioClient *minio.Client } func NewThird(discov discoveryregistry.SvcDiscoveryRegistry) *Third { @@ -36,5 +40,30 @@ func NewThird(discov discoveryregistry.SvcDiscoveryRegistry) *Third { panic(err) } client := third.NewThirdClient(conn) - return &Third{discov: discov, Client: client, conn: conn} + minioClient, err := minioInit() + return &Third{discov: discov, Client: client, conn: conn, MinioClient: minioClient} +} + +func minioInit() (*minio.Client, error) { + minioClient := &minio.Client{} + var initUrl string + initUrl = config.Config.Object.Minio.Endpoint + minioUrl, err := url.Parse(initUrl) + if err != nil { + return nil, err + } + opts := &minio.Options{ + Creds: credentials.NewStaticV4(config.Config.Object.Minio.AccessKeyID, config.Config.Object.Minio.SecretAccessKey, ""), + //Region: config.Config.Credential.Minio.Location, + } + if minioUrl.Scheme == "http" { + opts.Secure = false + } else if minioUrl.Scheme == "https" { + opts.Secure = true + } + minioClient, err = minio.New(minioUrl.Host, opts) + if err != nil { + return nil, err + } + return minioClient, nil } From e5ab278be5d4443987fa7520d017da41607af945 Mon Sep 17 00:00:00 2001 From: Gordon <46924906+FGadvancer@users.noreply.github.com> Date: Thu, 13 Jul 2023 15:17:05 +0800 Subject: [PATCH 2/3] fix: get user online status #472 (#527) * statistics user register * refactor: router change * minio init * UserRegisterCount * push use local conn * refactor: user pb update * remove online push close grpc conn * refactor: user pb update * refactor:pb file * msgs statistics * msgs statistics * revoke userID * refactor: errcode update * active user * active user * active user * refactor: errcode update * feat: conn update token * active user * active user * feat: conn update token * active user * feat: conn update token * feat: conn update token * feat: conn update token * add tx_oss cos * active user * active user * group create * group create * feat: group notification show to conversation * feat: group notification show to conversation * group active * user active * sendNotificationWithName * withname * privateChat * a2r call option * grpc with detail return error * change log error * chain unary interceptor * api nil slice map * fix sync has read * fix: text update * fix: update add model * set conversations update * set privateChat * fix: content update * remove unuse rpc * msgDestruct * cron use rpc mw * set IsMsgDestruct * msg destruct * msgDestruct * s3 minio, cos, oss support * feat: add implement of GetUsersOnlineStatus, #472 (#477) * s3 minio, cos, oss support * s3 route * remove extendMsg code * s3 route * remove unuse code * s3 pb * s3 pb * s3 pb * s3 presigned put * s3 presigned test * s3 presigned test * s3 presigned test * s3 presigned test * s3 presigned test * s3 presigned test * s3 presigned test * s3 presigned test * Update .gitignore (#482) * s3 debug log * s3 debug log * cron add log and fix cron * add log * cron * s3 config * fix kick user bug * s3 cos * add kick log * s3 cos test * s3 cos test * s3 cos test * kick user log * kickuserlog * s3 cos copy * s3 cos copy * s3 url * s3 url * s3 AccessURL * log * s3 InitiateMultipartUpload add ExpireTime * feat: regenerate pb file * feat: regenerate pb file * Revert "feat: regenerate pb file" This reverts commit 434f22564a89f816cbe944ab61bd9ff3414f0885. * Delete .idea directory * feat: regenerate pb file * fix: remove import C * fix: add msg transfer main file * fix: get user online status fix --------- Co-authored-by: withchao <993506633@qq.com> Co-authored-by: wangchuxiao Co-authored-by: BanTanger <88583317+BanTanger@users.noreply.github.com> Co-authored-by: withchao <48119764+withchao@users.noreply.github.com> Co-authored-by: Alan <68671759+hanzhixiao@users.noreply.github.com> --- internal/api/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/user.go b/internal/api/user.go index 4e3fb7f7f..4e9d1b0c7 100644 --- a/internal/api/user.go +++ b/internal/api/user.go @@ -107,7 +107,7 @@ func (u *UserApi) GetUsersOnlineStatus(c *gin.Context) { } if !flag { res.UserID = v1 - res.Status = constant.OnlineStatus + res.Status = constant.OfflineStatus } respResult = append(respResult, res) } From 4cacc3f6216c01b390ea99a96c69e54d3be52cd8 Mon Sep 17 00:00:00 2001 From: WangchuXiao Date: Thu, 13 Jul 2023 15:26:25 +0800 Subject: [PATCH 3/3] fix bug: friend, args error (#534) * fix bug: args error * fix bug: args error * fix bug: add friend need update both request * fix bug: add friend need update both request --- internal/rpc/friend/friend.go | 2 +- pkg/common/constant/constant.go | 5 +++-- pkg/common/convert/black.go | 3 +++ pkg/common/convert/friend.go | 6 ++++++ pkg/common/db/controller/friend.go | 17 ++++++++++++++++- pkg/proto/group/group.go | 3 --- pkg/proto/msg/msg.go | 12 ------------ 7 files changed, 29 insertions(+), 19 deletions(-) diff --git a/internal/rpc/friend/friend.go b/internal/rpc/friend/friend.go index c07b1423c..4c528d1d1 100644 --- a/internal/rpc/friend/friend.go +++ b/internal/rpc/friend/friend.go @@ -246,7 +246,6 @@ func (s *friendServer) GetPaginationFriendsApplyTo( req *pbfriend.GetPaginationFriendsApplyToReq, ) (resp *pbfriend.GetPaginationFriendsApplyToResp, err error) { defer log.ZInfo(ctx, utils.GetFuncName()+" Return") - resp = &pbfriend.GetPaginationFriendsApplyToResp{} if err := s.userRpcClient.Access(ctx, req.UserID); err != nil { return nil, err } @@ -255,6 +254,7 @@ func (s *friendServer) GetPaginationFriendsApplyTo( if err != nil { return nil, err } + resp = &pbfriend.GetPaginationFriendsApplyToResp{} resp.FriendRequests, err = convert.FriendRequestDB2Pb(ctx, friendRequests, s.userRpcClient.GetUsersInfoMap) if err != nil { return nil, err diff --git a/pkg/common/constant/constant.go b/pkg/common/constant/constant.go index ef33b9867..2e5432b48 100644 --- a/pkg/common/constant/constant.go +++ b/pkg/common/constant/constant.go @@ -291,8 +291,9 @@ const ( GroupResponseAgree = 1 GroupResponseRefuse = -1 - FriendResponseAgree = 1 - FriendResponseRefuse = -1 + FriendResponseNotHandle = 0 + FriendResponseAgree = 1 + FriendResponseRefuse = -1 Male = 1 Female = 2 diff --git a/pkg/common/convert/black.go b/pkg/common/convert/black.go index 684a40d0d..ba0e2a5da 100644 --- a/pkg/common/convert/black.go +++ b/pkg/common/convert/black.go @@ -27,6 +27,9 @@ func BlackDB2Pb( blackDBs []*relation.BlackModel, f func(ctx context.Context, userIDs []string) (map[string]*sdkws.UserInfo, error), ) (blackPbs []*sdk.BlackInfo, err error) { + if len(blackDBs) == 0 { + return nil, nil + } var userIDs []string for _, blackDB := range blackDBs { userIDs = append(userIDs, blackDB.BlockUserID) diff --git a/pkg/common/convert/friend.go b/pkg/common/convert/friend.go index 018aee42f..0531ad195 100644 --- a/pkg/common/convert/friend.go +++ b/pkg/common/convert/friend.go @@ -54,6 +54,9 @@ func FriendsDB2Pb( friendsDB []*relation.FriendModel, getUsers func(ctx context.Context, userIDs []string) (map[string]*sdkws.UserInfo, error), ) (friendsPb []*sdkws.FriendInfo, err error) { + if len(friendsDB) == 0 { + return nil, nil + } var userID []string for _, friendDB := range friendsDB { userID = append(userID, friendDB.FriendUserID) @@ -80,6 +83,9 @@ func FriendRequestDB2Pb( friendRequests []*relation.FriendRequestModel, getUsers func(ctx context.Context, userIDs []string) (map[string]*sdkws.UserInfo, error), ) ([]*sdkws.FriendRequest, error) { + if len(friendRequests) == 0 { + return nil, nil + } userIDMap := make(map[string]struct{}) for _, friendRequest := range friendRequests { userIDMap[friendRequest.ToUserID] = struct{}{} diff --git a/pkg/common/db/controller/friend.go b/pkg/common/db/controller/friend.go index 116345219..4d549efcf 100644 --- a/pkg/common/db/controller/friend.go +++ b/pkg/common/db/controller/friend.go @@ -221,6 +221,7 @@ func (f *friendDatabase) AgreeFriendRequest( friendRequest *relation.FriendRequestModel, ) (err error) { return f.tx.Transaction(func(tx any) error { + now := time.Now() fr, err := f.friendRequest.NewTx(tx).Take(ctx, friendRequest.FromUserID, friendRequest.ToUserID) if err != nil { return err @@ -230,11 +231,25 @@ func (f *friendDatabase) AgreeFriendRequest( } friendRequest.HandlerUserID = mcontext.GetOpUserID(ctx) friendRequest.HandleResult = constant.FriendResponseAgree - friendRequest.HandleTime = time.Now() + friendRequest.HandleTime = now err = f.friendRequest.NewTx(tx).Update(ctx, friendRequest) if err != nil { return err } + + fr2, err := f.friendRequest.NewTx(tx).Take(ctx, friendRequest.ToUserID, friendRequest.FromUserID) + if err == nil && fr2.HandleResult == constant.FriendResponseNotHandle { + fr2.HandlerUserID = mcontext.GetOpUserID(ctx) + fr2.HandleResult = constant.FriendResponseAgree + fr2.HandleTime = now + err = f.friendRequest.NewTx(tx).Update(ctx, fr2) + if err != nil { + return err + } + } else if errs.Unwrap(err) != gorm.ErrRecordNotFound { + return err + } + exists, err := f.friend.NewTx(tx).FindUserState(ctx, friendRequest.FromUserID, friendRequest.ToUserID) if err != nil { return err diff --git a/pkg/proto/group/group.go b/pkg/proto/group/group.go index 64e7f0f61..5b387cb3a 100644 --- a/pkg/proto/group/group.go +++ b/pkg/proto/group/group.go @@ -23,9 +23,6 @@ func (x *CreateGroupReq) Check() error { if x.GroupInfo == nil { return errs.ErrArgs.Wrap("groupInfo is empty") } - if x.GroupInfo.OwnerUserID == "" { - return errs.ErrArgs.Wrap("GroupInfo.ownerUserID") - } if x.GroupInfo.GroupType > 2 || x.GroupInfo.GroupType < 0 { return errs.ErrArgs.Wrap("GroupType is invalid") } diff --git a/pkg/proto/msg/msg.go b/pkg/proto/msg/msg.go index aeb6deece..62b776856 100644 --- a/pkg/proto/msg/msg.go +++ b/pkg/proto/msg/msg.go @@ -133,9 +133,6 @@ func (x *MarkConversationAsReadReq) Check() error { if x.ConversationID == "" { return errs.ErrArgs.Wrap("conversationID is empty") } - if x.Seqs == nil { - return errs.ErrArgs.Wrap("seqs is empty") - } if x.UserID == "" { return errs.ErrArgs.Wrap("userID is empty") } @@ -165,9 +162,6 @@ func (x *ClearConversationsMsgReq) Check() error { if x.UserID == "" { return errs.ErrArgs.Wrap("userID is empty") } - if x.DeleteSyncOpt == nil { - return errs.ErrArgs.Wrap("deleteSyncOpt is empty") - } return nil } @@ -175,9 +169,6 @@ func (x *UserClearAllMsgReq) Check() error { if x.UserID == "" { return errs.ErrArgs.Wrap("userID is empty") } - if x.DeleteSyncOpt == nil { - return errs.ErrArgs.Wrap("deleteSyncOpt is empty") - } return nil } @@ -191,9 +182,6 @@ func (x *DeleteMsgsReq) Check() error { if x.Seqs == nil { return errs.ErrArgs.Wrap("seqs is empty") } - if x.DeleteSyncOpt == nil { - return errs.ErrArgs.Wrap("deleteSyncOpt is empty") - } return nil }