mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-08-10 13:09:51 +08:00
Merge remote-tracking branch 'origin/errcode' into errcode
This commit is contained in:
commit
f03c72541a
@ -162,7 +162,7 @@ log:
|
|||||||
#日志级别 6表示全都打印,测试阶段建议设置为6
|
#日志级别 6表示全都打印,测试阶段建议设置为6
|
||||||
remainLogLevel: -1
|
remainLogLevel: -1
|
||||||
stderr: true
|
stderr: true
|
||||||
|
withStack: false
|
||||||
elasticSearchSwitch: false
|
elasticSearchSwitch: false
|
||||||
elasticSearchAddr: [ 127.0.0.1:9201 ]
|
elasticSearchAddr: [ 127.0.0.1:9201 ]
|
||||||
elasticSearchUser: ""
|
elasticSearchUser: ""
|
||||||
|
@ -2,6 +2,7 @@ package api
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/a2r"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/a2r"
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
|
||||||
|
@ -46,7 +46,7 @@ func (o *Friend) GetFriendApplyList(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o *Friend) GetSelfApplyList(c *gin.Context) {
|
func (o *Friend) GetSelfApplyList(c *gin.Context) {
|
||||||
a2r.Call(friend.FriendClient.GetPaginationFriendsApplyFrom, o.client, c)
|
a2r.Call(friend.FriendClient.GetPaginationFriendsApplyTo, o.client, c)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *Friend) GetFriendList(c *gin.Context) {
|
func (o *Friend) GetFriendList(c *gin.Context) {
|
||||||
|
@ -2,6 +2,7 @@ package friend
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/controller"
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/relation"
|
||||||
@ -177,7 +178,8 @@ func (s *friendServer) GetPaginationFriendsApplyTo(ctx context.Context, req *pbf
|
|||||||
if err := s.userCheck.Access(ctx, req.UserID); err != nil {
|
if err := s.userCheck.Access(ctx, req.UserID); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
friendRequests, total, err := s.FriendDatabase.PageFriendRequestToMe(ctx, req.UserID, req.Pagination.PageNumber, req.Pagination.ShowNumber)
|
pageNumber, showNumber := utils.GetPage(req.Pagination)
|
||||||
|
friendRequests, total, err := s.FriendDatabase.PageFriendRequestToMe(ctx, req.UserID, pageNumber, showNumber)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -195,7 +197,8 @@ func (s *friendServer) GetPaginationFriendsApplyFrom(ctx context.Context, req *p
|
|||||||
if err := s.userCheck.Access(ctx, req.UserID); err != nil {
|
if err := s.userCheck.Access(ctx, req.UserID); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
friendRequests, total, err := s.FriendDatabase.PageFriendRequestFromMe(ctx, req.UserID, req.Pagination.PageNumber, req.Pagination.ShowNumber)
|
pageNumber, showNumber := utils.GetPage(req.Pagination)
|
||||||
|
friendRequests, total, err := s.FriendDatabase.PageFriendRequestFromMe(ctx, req.UserID, pageNumber, showNumber)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -222,7 +225,8 @@ func (s *friendServer) GetPaginationFriends(ctx context.Context, req *pbfriend.G
|
|||||||
if err := s.userCheck.Access(ctx, req.UserID); err != nil {
|
if err := s.userCheck.Access(ctx, req.UserID); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
friends, total, err := s.FriendDatabase.PageOwnerFriends(ctx, req.UserID, req.Pagination.PageNumber, req.Pagination.ShowNumber)
|
pageNumber, showNumber := utils.GetPage(req.Pagination)
|
||||||
|
friends, total, err := s.FriendDatabase.PageOwnerFriends(ctx, req.UserID, pageNumber, showNumber)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -187,6 +187,7 @@ type config struct {
|
|||||||
RemainRotationCount uint `yaml:"remainRotationCount"`
|
RemainRotationCount uint `yaml:"remainRotationCount"`
|
||||||
RemainLogLevel int `yaml:"remainLogLevel"`
|
RemainLogLevel int `yaml:"remainLogLevel"`
|
||||||
Stderr bool `yaml:"stderr"`
|
Stderr bool `yaml:"stderr"`
|
||||||
|
WithStack bool `yaml:"withStack"`
|
||||||
ElasticSearchSwitch bool `yaml:"elasticSearchSwitch"`
|
ElasticSearchSwitch bool `yaml:"elasticSearchSwitch"`
|
||||||
ElasticSearchAddr []string `yaml:"elasticSearchAddr"`
|
ElasticSearchAddr []string `yaml:"elasticSearchAddr"`
|
||||||
ElasticSearchUser string `yaml:"elasticSearchUser"`
|
ElasticSearchUser string `yaml:"elasticSearchUser"`
|
||||||
|
@ -2,7 +2,7 @@ package controller
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"time"
|
||||||
|
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/constant"
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
|
||||||
@ -73,7 +73,7 @@ func (f *friendDatabase) AddFriendRequest(ctx context.Context, fromUserID, toUse
|
|||||||
return f.tx.Transaction(func(tx any) error {
|
return f.tx.Transaction(func(tx any) error {
|
||||||
_, err := f.friendRequest.NewTx(tx).Take(ctx, fromUserID, toUserID)
|
_, err := f.friendRequest.NewTx(tx).Take(ctx, fromUserID, toUserID)
|
||||||
//有db错误
|
//有db错误
|
||||||
if err != nil && errors.Unwrap(err) != gorm.ErrRecordNotFound {
|
if err != nil && errs.Unwrap(err) != gorm.ErrRecordNotFound {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
//无错误 则更新
|
//无错误 则更新
|
||||||
@ -89,7 +89,7 @@ func (f *friendDatabase) AddFriendRequest(ctx context.Context, fromUserID, toUse
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
//gorm.ErrRecordNotFound 错误,则新增
|
//gorm.ErrRecordNotFound 错误,则新增
|
||||||
if err := f.friendRequest.NewTx(tx).Create(ctx, []*relation.FriendRequestModel{{FromUserID: fromUserID, ToUserID: toUserID, ReqMsg: reqMsg, Ex: ex}}); err != nil {
|
if err := f.friendRequest.NewTx(tx).Create(ctx, []*relation.FriendRequestModel{{FromUserID: fromUserID, ToUserID: toUserID, ReqMsg: reqMsg, Ex: ex, CreateTime: time.Now(), HandleTime: time.Unix(0, 0)}}); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
@ -142,7 +142,8 @@ func (f *friendDatabase) RefuseFriendRequest(ctx context.Context, friendRequest
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
friendRequest.HandleResult = constant.FriendResponseRefuse
|
friendRequest.HandleResult = constant.FriendResponseRefuse
|
||||||
err = f.friendRequest.Update(ctx, []*relation.FriendRequestModel{friendRequest})
|
friendRequest.HandleTime = time.Now()
|
||||||
|
err = f.friendRequest.Update(ctx, friendRequest)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -158,7 +159,8 @@ func (f *friendDatabase) AgreeFriendRequest(ctx context.Context, friendRequest *
|
|||||||
}
|
}
|
||||||
friendRequest.HandlerUserID = friendRequest.FromUserID
|
friendRequest.HandlerUserID = friendRequest.FromUserID
|
||||||
friendRequest.HandleResult = constant.FriendResponseAgree
|
friendRequest.HandleResult = constant.FriendResponseAgree
|
||||||
err = f.friendRequest.NewTx(tx).Update(ctx, []*relation.FriendRequestModel{friendRequest})
|
friendRequest.HandleTime = time.Now()
|
||||||
|
err = f.friendRequest.NewTx(tx).Update(ctx, friendRequest)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -31,13 +31,13 @@ func (f *FriendRequestGorm) Delete(ctx context.Context, fromUserID, toUserID str
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 更新零值
|
// 更新零值
|
||||||
func (f *FriendRequestGorm) UpdateByMap(ctx context.Context, formUserID string, toUserID string, args map[string]interface{}) (err error) {
|
func (f *FriendRequestGorm) UpdateByMap(ctx context.Context, fromUserID string, toUserID string, args map[string]interface{}) (err error) {
|
||||||
return utils.Wrap(f.db(ctx).Model(&relation.FriendRequestModel{}).Where("from_user_id = ? AND to_user_id =?", formUserID, toUserID).Updates(args).Error, "")
|
return utils.Wrap(f.db(ctx).Model(&relation.FriendRequestModel{}).Where("from_user_id = ? AND to_user_id =?", fromUserID, toUserID).Updates(args).Error, "")
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新多条记录 (非零值)
|
// 更新记录 (非零值)
|
||||||
func (f *FriendRequestGorm) Update(ctx context.Context, friendRequests []*relation.FriendRequestModel) (err error) {
|
func (f *FriendRequestGorm) Update(ctx context.Context, friendRequest *relation.FriendRequestModel) (err error) {
|
||||||
return utils.Wrap(f.db(ctx).Updates(&friendRequests).Error, "")
|
return utils.Wrap(f.db(ctx).Where("from_user_id = ? AND to_user_id =?", friendRequest.FromUserID, friendRequest.ToUserID).Updates(friendRequest).Error, "")
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取来指定用户的好友申请 未找到 不返回错误
|
// 获取来指定用户的好友申请 未找到 不返回错误
|
||||||
|
@ -31,7 +31,7 @@ type FriendRequestModelInterface interface {
|
|||||||
// 更新零值
|
// 更新零值
|
||||||
UpdateByMap(ctx context.Context, formUserID string, toUserID string, args map[string]interface{}) (err error)
|
UpdateByMap(ctx context.Context, formUserID string, toUserID string, args map[string]interface{}) (err error)
|
||||||
// 更新多条记录 (非零值)
|
// 更新多条记录 (非零值)
|
||||||
Update(ctx context.Context, friendRequests []*FriendRequestModel) (err error)
|
Update(ctx context.Context, friendRequest *FriendRequestModel) (err error)
|
||||||
// 获取来指定用户的好友申请 未找到 不返回错误
|
// 获取来指定用户的好友申请 未找到 不返回错误
|
||||||
Find(ctx context.Context, fromUserID, toUserID string) (friendRequest *FriendRequestModel, err error)
|
Find(ctx context.Context, fromUserID, toUserID string) (friendRequest *FriendRequestModel, err error)
|
||||||
Take(ctx context.Context, fromUserID, toUserID string) (friendRequest *FriendRequestModel, err error)
|
Take(ctx context.Context, fromUserID, toUserID string) (friendRequest *FriendRequestModel, err error)
|
||||||
|
@ -3,6 +3,12 @@ package mw
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"math"
|
||||||
|
"runtime"
|
||||||
|
"runtime/debug"
|
||||||
|
"strings"
|
||||||
|
|
||||||
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/config"
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/mw/specialerror"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/mw/specialerror"
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/errs"
|
||||||
@ -12,10 +18,6 @@ import (
|
|||||||
"google.golang.org/grpc/codes"
|
"google.golang.org/grpc/codes"
|
||||||
"google.golang.org/grpc/metadata"
|
"google.golang.org/grpc/metadata"
|
||||||
"google.golang.org/grpc/status"
|
"google.golang.org/grpc/status"
|
||||||
"math"
|
|
||||||
"runtime"
|
|
||||||
"runtime/debug"
|
|
||||||
"strings"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const OperationID = "operationID"
|
const OperationID = "operationID"
|
||||||
@ -87,23 +89,25 @@ func rpcServerInterceptor(ctx context.Context, req interface{}, info *grpc.Unary
|
|||||||
}
|
}
|
||||||
grpcStatus := status.New(codes.Code(code), codeErr.Msg())
|
grpcStatus := status.New(codes.Code(code), codeErr.Msg())
|
||||||
var errInfo *errinfo.ErrorInfo
|
var errInfo *errinfo.ErrorInfo
|
||||||
if unwrap != err {
|
if config.Config.Log.WithStack {
|
||||||
sti, ok := err.(interface{ StackTrace() errors.StackTrace })
|
if unwrap != err {
|
||||||
if ok {
|
sti, ok := err.(interface{ StackTrace() errors.StackTrace })
|
||||||
log.ZWarn(ctx, "rpc server resp", err, "funcName", funcName, "unwrap", unwrap.Error(), "stack", fmt.Sprintf("%+v", err))
|
if ok {
|
||||||
if fs := sti.StackTrace(); len(fs) > 0 {
|
log.ZWarn(ctx, "rpc server resp", err, "funcName", funcName, "unwrap", unwrap.Error(), "stack", fmt.Sprintf("%+v", err))
|
||||||
pc := uintptr(fs[0])
|
if fs := sti.StackTrace(); len(fs) > 0 {
|
||||||
fn := runtime.FuncForPC(pc)
|
pc := uintptr(fs[0])
|
||||||
file, line := fn.FileLine(pc)
|
fn := runtime.FuncForPC(pc)
|
||||||
errInfo = &errinfo.ErrorInfo{
|
file, line := fn.FileLine(pc)
|
||||||
Path: file,
|
errInfo = &errinfo.ErrorInfo{
|
||||||
Line: uint32(line),
|
Path: file,
|
||||||
Name: fn.Name(),
|
Line: uint32(line),
|
||||||
Cause: unwrap.Error(),
|
Name: fn.Name(),
|
||||||
Warp: nil,
|
Cause: unwrap.Error(),
|
||||||
}
|
Warp: nil,
|
||||||
if arr := strings.Split(err.Error(), ": "); len(arr) > 1 {
|
}
|
||||||
errInfo.Warp = arr[:len(arr)-1]
|
if arr := strings.Split(err.Error(), ": "); len(arr) > 1 {
|
||||||
|
errInfo.Warp = arr[:len(arr)-1]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -86,3 +86,13 @@ func Unwrap(err error) error {
|
|||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Wrap(err error, msg ...string) error {
|
||||||
|
if err == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
if len(msg) == 0 {
|
||||||
|
return errors.WithStack(err)
|
||||||
|
}
|
||||||
|
return errors.Wrap(err, strings.Join(msg, ", "))
|
||||||
|
}
|
||||||
|
@ -297,7 +297,7 @@ type SetConversationReq struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Conversation *Conversation `protobuf:"bytes,1,opt,name=Conversation,proto3" json:"Conversation"`
|
Conversation *Conversation `protobuf:"bytes,1,opt,name=conversation,proto3" json:"conversation"`
|
||||||
NotificationType int32 `protobuf:"varint,2,opt,name=notificationType,proto3" json:"notificationType"`
|
NotificationType int32 `protobuf:"varint,2,opt,name=notificationType,proto3" json:"notificationType"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -390,9 +390,9 @@ type SetRecvMsgOptReq struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
OwnerUserID string `protobuf:"bytes,1,opt,name=OwnerUserID,proto3" json:"OwnerUserID"`
|
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"`
|
||||||
ConversationID string `protobuf:"bytes,2,opt,name=ConversationID,proto3" json:"ConversationID"`
|
ConversationID string `protobuf:"bytes,2,opt,name=conversationID,proto3" json:"conversationID"`
|
||||||
RecvMsgOpt int32 `protobuf:"varint,3,opt,name=RecvMsgOpt,proto3" json:"RecvMsgOpt"`
|
RecvMsgOpt int32 `protobuf:"varint,3,opt,name=recvMsgOpt,proto3" json:"recvMsgOpt"`
|
||||||
NotificationType int32 `protobuf:"varint,4,opt,name=notificationType,proto3" json:"notificationType"`
|
NotificationType int32 `protobuf:"varint,4,opt,name=notificationType,proto3" json:"notificationType"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -499,8 +499,8 @@ type GetConversationReq struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
ConversationID string `protobuf:"bytes,1,opt,name=ConversationID,proto3" json:"ConversationID"`
|
ConversationID string `protobuf:"bytes,1,opt,name=conversationID,proto3" json:"conversationID"`
|
||||||
OwnerUserID string `protobuf:"bytes,2,opt,name=OwnerUserID,proto3" json:"OwnerUserID"`
|
OwnerUserID string `protobuf:"bytes,2,opt,name=ownerUserID,proto3" json:"ownerUserID"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetConversationReq) Reset() {
|
func (x *GetConversationReq) Reset() {
|
||||||
@ -554,7 +554,7 @@ type GetConversationResp struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Conversation *Conversation `protobuf:"bytes,2,opt,name=Conversation,proto3" json:"Conversation"`
|
Conversation *Conversation `protobuf:"bytes,2,opt,name=conversation,proto3" json:"conversation"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetConversationResp) Reset() {
|
func (x *GetConversationResp) Reset() {
|
||||||
@ -601,8 +601,8 @@ type GetConversationsReq struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
OwnerUserID string `protobuf:"bytes,1,opt,name=OwnerUserID,proto3" json:"OwnerUserID"`
|
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"`
|
||||||
ConversationIDs []string `protobuf:"bytes,2,rep,name=ConversationIDs,proto3" json:"ConversationIDs"`
|
ConversationIDs []string `protobuf:"bytes,2,rep,name=conversationIDs,proto3" json:"conversationIDs"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetConversationsReq) Reset() {
|
func (x *GetConversationsReq) Reset() {
|
||||||
@ -656,7 +656,7 @@ type GetConversationsResp struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Conversations []*Conversation `protobuf:"bytes,2,rep,name=Conversations,proto3" json:"Conversations"`
|
Conversations []*Conversation `protobuf:"bytes,2,rep,name=conversations,proto3" json:"conversations"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetConversationsResp) Reset() {
|
func (x *GetConversationsResp) Reset() {
|
||||||
@ -703,7 +703,7 @@ type GetAllConversationsReq struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
OwnerUserID string `protobuf:"bytes,1,opt,name=OwnerUserID,proto3" json:"OwnerUserID"`
|
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID,proto3" json:"ownerUserID"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetAllConversationsReq) Reset() {
|
func (x *GetAllConversationsReq) Reset() {
|
||||||
@ -750,7 +750,7 @@ type GetAllConversationsResp struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Conversations []*Conversation `protobuf:"bytes,2,rep,name=Conversations,proto3" json:"Conversations"`
|
Conversations []*Conversation `protobuf:"bytes,2,rep,name=conversations,proto3" json:"conversations"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetAllConversationsResp) Reset() {
|
func (x *GetAllConversationsResp) Reset() {
|
||||||
@ -798,7 +798,7 @@ type BatchSetConversationsReq struct {
|
|||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Conversations []*Conversation `protobuf:"bytes,1,rep,name=Conversations,proto3" json:"Conversations"`
|
Conversations []*Conversation `protobuf:"bytes,1,rep,name=Conversations,proto3" json:"Conversations"`
|
||||||
OwnerUserID string `protobuf:"bytes,2,opt,name=OwnerUserID,proto3" json:"OwnerUserID"`
|
OwnerUserID string `protobuf:"bytes,2,opt,name=ownerUserID,proto3" json:"ownerUserID"`
|
||||||
NotificationType int32 `protobuf:"varint,3,opt,name=notificationType,proto3" json:"notificationType"`
|
NotificationType int32 `protobuf:"varint,3,opt,name=notificationType,proto3" json:"notificationType"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -860,8 +860,8 @@ type BatchSetConversationsResp struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Success []string `protobuf:"bytes,1,rep,name=Success,proto3" json:"Success"`
|
Success []string `protobuf:"bytes,1,rep,name=success,proto3" json:"success"`
|
||||||
Failed []string `protobuf:"bytes,2,rep,name=Failed,proto3" json:"Failed"`
|
Failed []string `protobuf:"bytes,2,rep,name=failed,proto3" json:"failed"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *BatchSetConversationsResp) Reset() {
|
func (x *BatchSetConversationsResp) Reset() {
|
||||||
@ -1060,62 +1060,62 @@ var file_conversation_conversation_proto_rawDesc = []byte{
|
|||||||
0x1b, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74,
|
0x1b, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74,
|
||||||
0x69, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x8d, 0x01, 0x0a,
|
0x69, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x65, 0x73, 0x70, 0x22, 0x8d, 0x01, 0x0a,
|
||||||
0x12, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
0x12, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
0x52, 0x65, 0x71, 0x12, 0x4b, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74,
|
0x52, 0x65, 0x71, 0x12, 0x4b, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74,
|
||||||
0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e,
|
0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e,
|
||||||
0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73,
|
0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73,
|
||||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69,
|
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69,
|
||||||
0x6f, 0x6e, 0x52, 0x0c, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
0x6f, 0x6e, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
0x12, 0x2a, 0x0a, 0x10, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
0x12, 0x2a, 0x0a, 0x10, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x6e, 0x6f, 0x74, 0x69,
|
0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x6e, 0x6f, 0x74, 0x69,
|
||||||
0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x15, 0x0a, 0x13,
|
0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x15, 0x0a, 0x13,
|
||||||
0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
|
0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
|
||||||
0x65, 0x73, 0x70, 0x22, 0xa8, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x52, 0x65, 0x63, 0x76, 0x4d,
|
0x65, 0x73, 0x70, 0x22, 0xa8, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x52, 0x65, 0x63, 0x76, 0x4d,
|
||||||
0x73, 0x67, 0x4f, 0x70, 0x74, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x77, 0x6e, 0x65,
|
0x73, 0x67, 0x4f, 0x70, 0x74, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x77, 0x6e, 0x65,
|
||||||
0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f,
|
0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f,
|
||||||
0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x43, 0x6f,
|
0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f,
|
||||||
0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01,
|
0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01,
|
||||||
0x28, 0x09, 0x52, 0x0e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74,
|
0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74,
|
||||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f,
|
0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x72, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f,
|
||||||
0x70, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69,
|
0x70, 0x74, 0x12, 0x2a, 0x0a, 0x10, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69,
|
||||||
0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x6e, 0x6f,
|
0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x6e, 0x6f,
|
||||||
0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x13,
|
0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0x13,
|
||||||
0x0a, 0x11, 0x53, 0x65, 0x74, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74, 0x52,
|
0x0a, 0x11, 0x53, 0x65, 0x74, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74, 0x52,
|
||||||
0x65, 0x73, 0x70, 0x22, 0x5e, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72,
|
0x65, 0x73, 0x70, 0x22, 0x5e, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72,
|
||||||
0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x26, 0x0a, 0x0e, 0x43, 0x6f, 0x6e,
|
0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x26, 0x0a, 0x0e, 0x63, 0x6f, 0x6e,
|
||||||
0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28,
|
0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||||
0x09, 0x52, 0x0e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49,
|
0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49,
|
||||||
0x44, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44,
|
0x44, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44,
|
||||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65,
|
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65,
|
||||||
0x72, 0x49, 0x44, 0x22, 0x62, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72,
|
0x72, 0x49, 0x44, 0x22, 0x62, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72,
|
||||||
0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4b, 0x0a, 0x0c, 0x43, 0x6f,
|
0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4b, 0x0a, 0x0c, 0x63, 0x6f,
|
||||||
0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
||||||
0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e,
|
0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e,
|
||||||
0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e,
|
0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e,
|
||||||
0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x43, 0x6f, 0x6e, 0x76, 0x65,
|
0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x76, 0x65,
|
||||||
0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x61, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x6f,
|
0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x61, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x43, 0x6f,
|
||||||
0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x12, 0x20,
|
0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x12, 0x20,
|
||||||
0x0a, 0x0b, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20,
|
0x0a, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20,
|
||||||
0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44,
|
0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44,
|
||||||
0x12, 0x28, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
0x12, 0x28, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
0x49, 0x44, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x43, 0x6f, 0x6e, 0x76, 0x65,
|
0x49, 0x44, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65,
|
||||||
0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x22, 0x65, 0x0a, 0x14, 0x47, 0x65,
|
0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x73, 0x22, 0x65, 0x0a, 0x14, 0x47, 0x65,
|
||||||
0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65,
|
0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65,
|
||||||
0x73, 0x70, 0x12, 0x4d, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69,
|
0x73, 0x70, 0x12, 0x4d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69,
|
||||||
0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e,
|
0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e,
|
||||||
0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73,
|
0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73,
|
||||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69,
|
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69,
|
||||||
0x6f, 0x6e, 0x52, 0x0d, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
0x6f, 0x6e, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
0x73, 0x22, 0x3a, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x76, 0x65,
|
0x73, 0x22, 0x3a, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x76, 0x65,
|
||||||
0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x4f,
|
0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x6f,
|
||||||
0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||||
0x52, 0x0b, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x68, 0x0a,
|
0x52, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x68, 0x0a,
|
||||||
0x17, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74,
|
0x17, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74,
|
||||||
0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4d, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x76,
|
0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x76,
|
||||||
0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||||
0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63,
|
0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63,
|
||||||
0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x76,
|
0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x76,
|
||||||
0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72,
|
0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72,
|
||||||
0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xb7, 0x01, 0x0a, 0x18, 0x42, 0x61, 0x74, 0x63,
|
0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xb7, 0x01, 0x0a, 0x18, 0x42, 0x61, 0x74, 0x63,
|
||||||
0x68, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
0x68, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
0x73, 0x52, 0x65, 0x71, 0x12, 0x4d, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61,
|
0x73, 0x52, 0x65, 0x71, 0x12, 0x4d, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61,
|
||||||
@ -1123,16 +1123,16 @@ var file_conversation_conversation_proto_rawDesc = []byte{
|
|||||||
0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65,
|
0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65,
|
||||||
0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61,
|
0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61,
|
||||||
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69,
|
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69,
|
||||||
0x6f, 0x6e, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72,
|
0x6f, 0x6e, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72,
|
||||||
0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x55,
|
0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x55,
|
||||||
0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x2a, 0x0a, 0x10, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63,
|
0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x2a, 0x0a, 0x10, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63,
|
||||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52,
|
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||||
0x10, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70,
|
0x10, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70,
|
||||||
0x65, 0x22, 0x4d, 0x0a, 0x19, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e,
|
0x65, 0x22, 0x4d, 0x0a, 0x19, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e,
|
||||||
0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18,
|
0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18,
|
||||||
0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52,
|
0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52,
|
||||||
0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x46, 0x61, 0x69, 0x6c,
|
0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x61, 0x69, 0x6c,
|
||||||
0x65, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64,
|
0x65, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64,
|
||||||
0x22, 0x39, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4e, 0x6f,
|
0x22, 0x39, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4e, 0x6f,
|
||||||
0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x52, 0x65,
|
0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x52, 0x65,
|
||||||
0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01,
|
0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01,
|
||||||
@ -1245,10 +1245,10 @@ var file_conversation_conversation_proto_goTypes = []interface{}{
|
|||||||
}
|
}
|
||||||
var file_conversation_conversation_proto_depIdxs = []int32{
|
var file_conversation_conversation_proto_depIdxs = []int32{
|
||||||
0, // 0: OpenIMServer.conversation.ModifyConversationFieldReq.conversation:type_name -> OpenIMServer.conversation.Conversation
|
0, // 0: OpenIMServer.conversation.ModifyConversationFieldReq.conversation:type_name -> OpenIMServer.conversation.Conversation
|
||||||
0, // 1: OpenIMServer.conversation.SetConversationReq.Conversation:type_name -> OpenIMServer.conversation.Conversation
|
0, // 1: OpenIMServer.conversation.SetConversationReq.conversation:type_name -> OpenIMServer.conversation.Conversation
|
||||||
0, // 2: OpenIMServer.conversation.GetConversationResp.Conversation:type_name -> OpenIMServer.conversation.Conversation
|
0, // 2: OpenIMServer.conversation.GetConversationResp.conversation:type_name -> OpenIMServer.conversation.Conversation
|
||||||
0, // 3: OpenIMServer.conversation.GetConversationsResp.Conversations:type_name -> OpenIMServer.conversation.Conversation
|
0, // 3: OpenIMServer.conversation.GetConversationsResp.conversations:type_name -> OpenIMServer.conversation.Conversation
|
||||||
0, // 4: OpenIMServer.conversation.GetAllConversationsResp.Conversations:type_name -> OpenIMServer.conversation.Conversation
|
0, // 4: OpenIMServer.conversation.GetAllConversationsResp.conversations:type_name -> OpenIMServer.conversation.Conversation
|
||||||
0, // 5: OpenIMServer.conversation.BatchSetConversationsReq.Conversations:type_name -> OpenIMServer.conversation.Conversation
|
0, // 5: OpenIMServer.conversation.BatchSetConversationsReq.Conversations:type_name -> OpenIMServer.conversation.Conversation
|
||||||
1, // 6: OpenIMServer.conversation.conversation.ModifyConversationField:input_type -> OpenIMServer.conversation.ModifyConversationFieldReq
|
1, // 6: OpenIMServer.conversation.conversation.ModifyConversationField:input_type -> OpenIMServer.conversation.ModifyConversationFieldReq
|
||||||
7, // 7: OpenIMServer.conversation.conversation.GetConversation:input_type -> OpenIMServer.conversation.GetConversationReq
|
7, // 7: OpenIMServer.conversation.conversation.GetConversation:input_type -> OpenIMServer.conversation.GetConversationReq
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation";
|
|
||||||
package OpenIMServer.conversation;
|
package OpenIMServer.conversation;
|
||||||
|
option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/conversation";
|
||||||
|
|
||||||
message Conversation{
|
message Conversation{
|
||||||
string ownerUserID = 1;
|
string ownerUserID = 1;
|
||||||
@ -31,7 +31,7 @@ message ModifyConversationFieldResp{
|
|||||||
}
|
}
|
||||||
|
|
||||||
message SetConversationReq{
|
message SetConversationReq{
|
||||||
Conversation Conversation = 1;
|
Conversation conversation = 1;
|
||||||
int32 notificationType = 2;
|
int32 notificationType = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,9 +39,9 @@ message SetConversationResp{
|
|||||||
}
|
}
|
||||||
|
|
||||||
message SetRecvMsgOptReq {
|
message SetRecvMsgOptReq {
|
||||||
string OwnerUserID = 1;
|
string ownerUserID = 1;
|
||||||
string ConversationID = 2;
|
string conversationID = 2;
|
||||||
int32 RecvMsgOpt = 3;
|
int32 recvMsgOpt = 3;
|
||||||
int32 notificationType = 4;
|
int32 notificationType = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,40 +49,40 @@ message SetRecvMsgOptResp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
message GetConversationReq{
|
message GetConversationReq{
|
||||||
string ConversationID = 1;
|
string conversationID = 1;
|
||||||
string OwnerUserID = 2;
|
string ownerUserID = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message GetConversationResp{
|
message GetConversationResp{
|
||||||
Conversation Conversation = 2;
|
Conversation conversation = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message GetConversationsReq{
|
message GetConversationsReq{
|
||||||
string OwnerUserID = 1;
|
string ownerUserID = 1;
|
||||||
repeated string ConversationIDs = 2;
|
repeated string conversationIDs = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message GetConversationsResp{
|
message GetConversationsResp{
|
||||||
repeated Conversation Conversations = 2;
|
repeated Conversation conversations = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message GetAllConversationsReq{
|
message GetAllConversationsReq{
|
||||||
string OwnerUserID = 1;
|
string ownerUserID = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message GetAllConversationsResp{
|
message GetAllConversationsResp{
|
||||||
repeated Conversation Conversations = 2;
|
repeated Conversation conversations = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message BatchSetConversationsReq{
|
message BatchSetConversationsReq{
|
||||||
repeated Conversation Conversations = 1;
|
repeated Conversation Conversations = 1;
|
||||||
string OwnerUserID = 2;
|
string ownerUserID = 2;
|
||||||
int32 notificationType = 3;
|
int32 notificationType = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
message BatchSetConversationsResp{
|
message BatchSetConversationsResp{
|
||||||
repeated string Success = 1;
|
repeated string success = 1;
|
||||||
repeated string Failed = 2;
|
repeated string failed = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message GetRecvMsgNotNotifyUserIDsReq {
|
message GetRecvMsgNotNotifyUserIDsReq {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
package OpenIMServer.friend;
|
||||||
import "sdkws/sdkws.proto";
|
import "sdkws/sdkws.proto";
|
||||||
option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/friend";
|
option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/friend";
|
||||||
package OpenIMServer.friend;
|
|
||||||
|
|
||||||
message getPaginationFriendsReq{
|
message getPaginationFriendsReq{
|
||||||
sdkws.RequestPagination pagination = 1;
|
sdkws.RequestPagination pagination = 1;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
package OpenIMServer.group;
|
||||||
import "sdkws/sdkws.proto";
|
import "sdkws/sdkws.proto";
|
||||||
import "wrapperspb/wrapperspb.proto";
|
import "wrapperspb/wrapperspb.proto";
|
||||||
option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/group";
|
option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/group";
|
||||||
package OpenIMServer.group;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
package OpenIMServer.msg;
|
||||||
import "sdkws/sdkws.proto";
|
import "sdkws/sdkws.proto";
|
||||||
import "wrapperspb/wrapperspb.proto";
|
import "wrapperspb/wrapperspb.proto";
|
||||||
option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg";
|
option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msg";
|
||||||
package OpenIMServer.msg;
|
|
||||||
|
|
||||||
message MsgDataToMQ{
|
message MsgDataToMQ{
|
||||||
string token = 1;
|
string token = 1;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
package OpenIMServer.msggateway;
|
||||||
import "sdkws/sdkws.proto";
|
import "sdkws/sdkws.proto";
|
||||||
option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msggateway";
|
option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/msggateway";
|
||||||
package OpenIMServer.msggateway;
|
|
||||||
|
|
||||||
message OnlinePushMsgReq {
|
message OnlinePushMsgReq {
|
||||||
sdkws.MsgData msgData = 1;
|
sdkws.MsgData msgData = 1;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
package OpenIMServer.push;
|
||||||
import "sdkws/sdkws.proto";
|
import "sdkws/sdkws.proto";
|
||||||
option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/push";
|
option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/push";
|
||||||
package OpenIMServer.push;
|
|
||||||
|
|
||||||
message PushMsgReq {
|
message PushMsgReq {
|
||||||
sdkws.MsgData msgData = 1;
|
sdkws.MsgData msgData = 1;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
package OpenIMServer.rtc;
|
||||||
import "sdkws/sdkws.proto";
|
import "sdkws/sdkws.proto";
|
||||||
option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/rtc";
|
option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/rtc";
|
||||||
package OpenIMServer.rtc;
|
|
||||||
|
|
||||||
message SignalMessageAssembleReq {
|
message SignalMessageAssembleReq {
|
||||||
sdkws.SignalReq signalReq = 1;
|
sdkws.SignalReq signalReq = 1;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
package OpenIMServer.third;
|
||||||
import "sdkws/sdkws.proto";
|
import "sdkws/sdkws.proto";
|
||||||
option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/third";
|
option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/third";
|
||||||
package OpenIMServer.third;
|
|
||||||
|
|
||||||
message ApplyPutReq {
|
message ApplyPutReq {
|
||||||
string name = 1;
|
string name = 1;
|
||||||
|
@ -1665,7 +1665,7 @@ var file_user_user_proto_rawDesc = []byte{
|
|||||||
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2a, 0x0a,
|
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2a, 0x0a,
|
||||||
0x10, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70,
|
0x10, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x52, 0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70,
|
||||||
0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x52,
|
0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x52,
|
||||||
0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74, 0x32, 0xde, 0x05, 0x0a, 0x04, 0x75, 0x73,
|
0x65, 0x63, 0x76, 0x4d, 0x73, 0x67, 0x4f, 0x70, 0x74, 0x32, 0xb7, 0x06, 0x0a, 0x04, 0x75, 0x73,
|
||||||
0x65, 0x72, 0x12, 0x66, 0x0a, 0x11, 0x67, 0x65, 0x74, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x61,
|
0x65, 0x72, 0x12, 0x66, 0x0a, 0x11, 0x67, 0x65, 0x74, 0x44, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x61,
|
||||||
0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d,
|
0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d,
|
||||||
0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x65, 0x74, 0x44,
|
0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67, 0x65, 0x74, 0x44,
|
||||||
@ -1711,11 +1711,17 @@ var file_user_user_proto_rawDesc = []byte{
|
|||||||
0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
|
0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
|
||||||
0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65,
|
0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65,
|
||||||
0x72, 0x76, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x52, 0x65,
|
0x72, 0x76, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x52, 0x65,
|
||||||
0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69,
|
0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x57, 0x0a, 0x0c, 0x67, 0x65,
|
||||||
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53,
|
0x74, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x12, 0x22, 0x2e, 0x4f, 0x70, 0x65,
|
||||||
0x44, 0x4b, 0x2f, 0x4f, 0x70, 0x65, 0x6e, 0x2d, 0x49, 0x4d, 0x2d, 0x53, 0x65, 0x72, 0x76, 0x65,
|
0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x67,
|
||||||
0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x75, 0x73, 0x65, 0x72,
|
0x65, 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x52, 0x65, 0x71, 0x1a, 0x23,
|
||||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x75, 0x73,
|
||||||
|
0x65, 0x72, 0x2e, 0x67, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x52,
|
||||||
|
0x65, 0x73, 0x70, 0x42, 0x34, 0x5a, 0x32, 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, 0x75, 0x73, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||||
|
0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -1785,15 +1791,17 @@ var file_user_user_proto_depIdxs = []int32{
|
|||||||
2, // 16: OpenIMServer.user.user.accountCheck:input_type -> OpenIMServer.user.accountCheckReq
|
2, // 16: OpenIMServer.user.user.accountCheck:input_type -> OpenIMServer.user.accountCheckReq
|
||||||
22, // 17: OpenIMServer.user.user.getPaginationUsers:input_type -> OpenIMServer.user.getPaginationUsersReq
|
22, // 17: OpenIMServer.user.user.getPaginationUsers:input_type -> OpenIMServer.user.getPaginationUsersReq
|
||||||
24, // 18: OpenIMServer.user.user.userRegister:input_type -> OpenIMServer.user.userRegisterReq
|
24, // 18: OpenIMServer.user.user.userRegister:input_type -> OpenIMServer.user.userRegisterReq
|
||||||
5, // 19: OpenIMServer.user.user.getDesignateUsers:output_type -> OpenIMServer.user.getDesignateUsersResp
|
0, // 19: OpenIMServer.user.user.getAllUserID:input_type -> OpenIMServer.user.getAllUserIDReq
|
||||||
7, // 20: OpenIMServer.user.user.updateUserInfo:output_type -> OpenIMServer.user.updateUserInfoResp
|
5, // 20: OpenIMServer.user.user.getDesignateUsers:output_type -> OpenIMServer.user.getDesignateUsersResp
|
||||||
9, // 21: OpenIMServer.user.user.setGlobalRecvMessageOpt:output_type -> OpenIMServer.user.setGlobalRecvMessageOptResp
|
7, // 21: OpenIMServer.user.user.updateUserInfo:output_type -> OpenIMServer.user.updateUserInfoResp
|
||||||
27, // 22: OpenIMServer.user.user.getGlobalRecvMessageOpt:output_type -> OpenIMServer.user.getGlobalRecvMessageOptResp
|
9, // 22: OpenIMServer.user.user.setGlobalRecvMessageOpt:output_type -> OpenIMServer.user.setGlobalRecvMessageOptResp
|
||||||
3, // 23: OpenIMServer.user.user.accountCheck:output_type -> OpenIMServer.user.accountCheckResp
|
27, // 23: OpenIMServer.user.user.getGlobalRecvMessageOpt:output_type -> OpenIMServer.user.getGlobalRecvMessageOptResp
|
||||||
23, // 24: OpenIMServer.user.user.getPaginationUsers:output_type -> OpenIMServer.user.getPaginationUsersResp
|
3, // 24: OpenIMServer.user.user.accountCheck:output_type -> OpenIMServer.user.accountCheckResp
|
||||||
25, // 25: OpenIMServer.user.user.userRegister:output_type -> OpenIMServer.user.userRegisterResp
|
23, // 25: OpenIMServer.user.user.getPaginationUsers:output_type -> OpenIMServer.user.getPaginationUsersResp
|
||||||
19, // [19:26] is the sub-list for method output_type
|
25, // 26: OpenIMServer.user.user.userRegister:output_type -> OpenIMServer.user.userRegisterResp
|
||||||
12, // [12:19] is the sub-list for method input_type
|
1, // 27: OpenIMServer.user.user.getAllUserID:output_type -> OpenIMServer.user.getAllUserIDResp
|
||||||
|
20, // [20:28] is the sub-list for method output_type
|
||||||
|
12, // [12:20] is the sub-list for method input_type
|
||||||
12, // [12:12] is the sub-list for extension type_name
|
12, // [12:12] is the sub-list for extension type_name
|
||||||
12, // [12:12] is the sub-list for extension extendee
|
12, // [12:12] is the sub-list for extension extendee
|
||||||
0, // [0:12] is the sub-list for field type_name
|
0, // [0:12] is the sub-list for field type_name
|
||||||
@ -2200,6 +2208,8 @@ type UserClient interface {
|
|||||||
GetPaginationUsers(ctx context.Context, in *GetPaginationUsersReq, opts ...grpc.CallOption) (*GetPaginationUsersResp, error)
|
GetPaginationUsers(ctx context.Context, in *GetPaginationUsersReq, opts ...grpc.CallOption) (*GetPaginationUsersResp, error)
|
||||||
// 用户注册
|
// 用户注册
|
||||||
UserRegister(ctx context.Context, in *UserRegisterReq, opts ...grpc.CallOption) (*UserRegisterResp, error)
|
UserRegister(ctx context.Context, in *UserRegisterReq, opts ...grpc.CallOption) (*UserRegisterResp, error)
|
||||||
|
// 获取所有用户ID
|
||||||
|
GetAllUserID(ctx context.Context, in *GetAllUserIDReq, opts ...grpc.CallOption) (*GetAllUserIDResp, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type userClient struct {
|
type userClient struct {
|
||||||
@ -2273,6 +2283,15 @@ func (c *userClient) UserRegister(ctx context.Context, in *UserRegisterReq, opts
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *userClient) GetAllUserID(ctx context.Context, in *GetAllUserIDReq, opts ...grpc.CallOption) (*GetAllUserIDResp, error) {
|
||||||
|
out := new(GetAllUserIDResp)
|
||||||
|
err := c.cc.Invoke(ctx, "/OpenIMServer.user.user/getAllUserID", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
// UserServer is the server API for User service.
|
// UserServer is the server API for User service.
|
||||||
type UserServer interface {
|
type UserServer interface {
|
||||||
// 获取指定的用户信息 全字段
|
// 获取指定的用户信息 全字段
|
||||||
@ -2289,6 +2308,8 @@ type UserServer interface {
|
|||||||
GetPaginationUsers(context.Context, *GetPaginationUsersReq) (*GetPaginationUsersResp, error)
|
GetPaginationUsers(context.Context, *GetPaginationUsersReq) (*GetPaginationUsersResp, error)
|
||||||
// 用户注册
|
// 用户注册
|
||||||
UserRegister(context.Context, *UserRegisterReq) (*UserRegisterResp, error)
|
UserRegister(context.Context, *UserRegisterReq) (*UserRegisterResp, error)
|
||||||
|
// 获取所有用户ID
|
||||||
|
GetAllUserID(context.Context, *GetAllUserIDReq) (*GetAllUserIDResp, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnimplementedUserServer can be embedded to have forward compatible implementations.
|
// UnimplementedUserServer can be embedded to have forward compatible implementations.
|
||||||
@ -2316,6 +2337,9 @@ func (*UnimplementedUserServer) GetPaginationUsers(context.Context, *GetPaginati
|
|||||||
func (*UnimplementedUserServer) UserRegister(context.Context, *UserRegisterReq) (*UserRegisterResp, error) {
|
func (*UnimplementedUserServer) UserRegister(context.Context, *UserRegisterReq) (*UserRegisterResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method UserRegister not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method UserRegister not implemented")
|
||||||
}
|
}
|
||||||
|
func (*UnimplementedUserServer) GetAllUserID(context.Context, *GetAllUserIDReq) (*GetAllUserIDResp, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetAllUserID not implemented")
|
||||||
|
}
|
||||||
|
|
||||||
func RegisterUserServer(s *grpc.Server, srv UserServer) {
|
func RegisterUserServer(s *grpc.Server, srv UserServer) {
|
||||||
s.RegisterService(&_User_serviceDesc, srv)
|
s.RegisterService(&_User_serviceDesc, srv)
|
||||||
@ -2447,6 +2471,24 @@ func _User_UserRegister_Handler(srv interface{}, ctx context.Context, dec func(i
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _User_GetAllUserID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetAllUserIDReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(UserServer).GetAllUserID(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/OpenIMServer.user.user/GetAllUserID",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(UserServer).GetAllUserID(ctx, req.(*GetAllUserIDReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
var _User_serviceDesc = grpc.ServiceDesc{
|
var _User_serviceDesc = grpc.ServiceDesc{
|
||||||
ServiceName: "OpenIMServer.user.user",
|
ServiceName: "OpenIMServer.user.user",
|
||||||
HandlerType: (*UserServer)(nil),
|
HandlerType: (*UserServer)(nil),
|
||||||
@ -2479,6 +2521,10 @@ var _User_serviceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "userRegister",
|
MethodName: "userRegister",
|
||||||
Handler: _User_UserRegister_Handler,
|
Handler: _User_UserRegister_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "getAllUserID",
|
||||||
|
Handler: _User_GetAllUserID_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "user/user.proto",
|
Metadata: "user/user.proto",
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
package OpenIMServer.user;
|
||||||
import "sdkws/sdkws.proto";
|
import "sdkws/sdkws.proto";
|
||||||
import "conversation/conversation.proto";
|
import "conversation/conversation.proto";
|
||||||
option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/user";
|
option go_package = "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/user";
|
||||||
package OpenIMServer.user;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
message getAllUserIDReq{
|
message getAllUserIDReq{
|
||||||
sdkws.RequestPagination pagination = 1;
|
sdkws.RequestPagination pagination = 1;
|
||||||
@ -49,7 +46,7 @@ message setGlobalRecvMessageOptResp{
|
|||||||
}
|
}
|
||||||
|
|
||||||
message setConversationReq{
|
message setConversationReq{
|
||||||
conversation.Conversation conversation = 1;
|
OpenIMServer.conversation.Conversation conversation = 1;
|
||||||
int32 notificationType = 2;
|
int32 notificationType = 2;
|
||||||
string operationID = 3;
|
string operationID = 3;
|
||||||
}
|
}
|
||||||
@ -77,7 +74,7 @@ message getConversationReq{
|
|||||||
}
|
}
|
||||||
|
|
||||||
message getConversationResp{
|
message getConversationResp{
|
||||||
conversation.Conversation conversation = 2;
|
OpenIMServer.conversation.Conversation conversation = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message getConversationsReq{
|
message getConversationsReq{
|
||||||
@ -87,7 +84,7 @@ message getConversationsReq{
|
|||||||
}
|
}
|
||||||
|
|
||||||
message getConversationsResp{
|
message getConversationsResp{
|
||||||
repeated conversation.Conversation conversations = 2;
|
repeated OpenIMServer.conversation.Conversation conversations = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message getAllConversationsReq{
|
message getAllConversationsReq{
|
||||||
@ -96,11 +93,11 @@ message getAllConversationsReq{
|
|||||||
}
|
}
|
||||||
|
|
||||||
message getAllConversationsResp{
|
message getAllConversationsResp{
|
||||||
repeated conversation.Conversation conversations = 2;
|
repeated OpenIMServer.conversation.Conversation conversations = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message batchSetConversationsReq{
|
message batchSetConversationsReq{
|
||||||
repeated conversation.Conversation conversations = 1;
|
repeated OpenIMServer.conversation.Conversation conversations = 1;
|
||||||
string OwnerUserID = 2;
|
string OwnerUserID = 2;
|
||||||
int32 notificationType = 3;
|
int32 notificationType = 3;
|
||||||
string OperationID = 4;
|
string OperationID = 4;
|
||||||
|
@ -2,13 +2,14 @@ package convert
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/db/table/relation"
|
||||||
discoveryRegistry "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
|
discoveryRegistry "github.com/OpenIMSDK/Open-IM-Server/pkg/discoveryregistry"
|
||||||
sdk "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
|
sdk "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
|
||||||
"github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/check"
|
"github.com/OpenIMSDK/Open-IM-Server/pkg/rpcclient/check"
|
||||||
utils2 "github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
|
utils2 "github.com/OpenIMSDK/Open-IM-Server/pkg/utils"
|
||||||
utils "github.com/OpenIMSDK/open_utils"
|
utils "github.com/OpenIMSDK/open_utils"
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type DBFriend struct {
|
type DBFriend struct {
|
||||||
@ -39,7 +40,7 @@ func (*PBFriend) PB2DB(friends []*sdk.FriendInfo) (DBFriends []*relation.FriendM
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (db *DBFriend) DB2PB(ctx context.Context, friends []*relation.FriendModel) (PBFriends []*sdk.FriendInfo, err error) {
|
func (db *DBFriend) DB2PB(ctx context.Context, friends []*relation.FriendModel) (pbFriends []*sdk.FriendInfo, err error) {
|
||||||
userIDs := utils2.Slice(friends, func(e *relation.FriendModel) string { return e.FriendUserID })
|
userIDs := utils2.Slice(friends, func(e *relation.FriendModel) string { return e.FriendUserID })
|
||||||
users, err := db.userCheck.GetUsersInfoMap(ctx, userIDs, true)
|
users, err := db.userCheck.GetUsersInfoMap(ctx, userIDs, true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -51,6 +52,12 @@ func (db *DBFriend) DB2PB(ctx context.Context, friends []*relation.FriendModel)
|
|||||||
utils.CopyStructFields(pbfriend.FriendUser, users[v.FriendUserID])
|
utils.CopyStructFields(pbfriend.FriendUser, users[v.FriendUserID])
|
||||||
pbfriend.CreateTime = v.CreateTime.Unix()
|
pbfriend.CreateTime = v.CreateTime.Unix()
|
||||||
pbfriend.FriendUser.CreateTime = v.CreateTime.Unix()
|
pbfriend.FriendUser.CreateTime = v.CreateTime.Unix()
|
||||||
|
pbfriend.OperatorUserID = v.OperatorUserID
|
||||||
|
pbfriend.OwnerUserID = v.OwnerUserID
|
||||||
|
pbfriend.Remark = v.Remark
|
||||||
|
pbfriend.AddSource = v.AddSource
|
||||||
|
pbfriend.Ex = v.Ex
|
||||||
|
pbFriends = append(pbFriends, pbfriend)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -110,20 +117,30 @@ func (db *DBFriendRequest) DB2PB(ctx context.Context, friendRequests []*relation
|
|||||||
if len(friendRequests) > 0 {
|
if len(friendRequests) > 0 {
|
||||||
userIDs = append(userIDs, friendRequests[0].FromUserID)
|
userIDs = append(userIDs, friendRequests[0].FromUserID)
|
||||||
}
|
}
|
||||||
|
for _, v := range friendRequests {
|
||||||
|
userIDs = append(userIDs, v.ToUserID)
|
||||||
|
}
|
||||||
users, err := db.userCheck.GetUsersInfoMap(ctx, userIDs, true)
|
users, err := db.userCheck.GetUsersInfoMap(ctx, userIDs, true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
for _, v := range friendRequests {
|
for _, v := range friendRequests {
|
||||||
pbFriendRequest := &sdk.FriendRequest{}
|
pbFriendRequest := &sdk.FriendRequest{}
|
||||||
|
pbFriendRequest.FromUserID = users[v.FromUserID].UserID
|
||||||
pbFriendRequest.FromNickname = users[v.FromUserID].Nickname
|
pbFriendRequest.FromNickname = users[v.FromUserID].Nickname
|
||||||
pbFriendRequest.FromFaceURL = users[v.FromUserID].FaceURL
|
pbFriendRequest.FromFaceURL = users[v.FromUserID].FaceURL
|
||||||
pbFriendRequest.FromGender = users[v.FromUserID].Gender
|
pbFriendRequest.FromGender = users[v.FromUserID].Gender
|
||||||
|
pbFriendRequest.ToUserID = users[v.ToUserID].UserID
|
||||||
pbFriendRequest.ToNickname = users[v.ToUserID].Nickname
|
pbFriendRequest.ToNickname = users[v.ToUserID].Nickname
|
||||||
pbFriendRequest.ToFaceURL = users[v.ToUserID].FaceURL
|
pbFriendRequest.ToFaceURL = users[v.ToUserID].FaceURL
|
||||||
pbFriendRequest.ToGender = users[v.ToUserID].Gender
|
pbFriendRequest.ToGender = users[v.ToUserID].Gender
|
||||||
pbFriendRequest.CreateTime = db.CreateTime.Unix()
|
pbFriendRequest.CreateTime = v.CreateTime.Unix()
|
||||||
pbFriendRequest.HandleTime = db.HandleTime.Unix()
|
pbFriendRequest.HandleTime = v.HandleTime.Unix()
|
||||||
|
pbFriendRequest.HandlerUserID = v.HandlerUserID
|
||||||
|
pbFriendRequest.HandleResult = v.HandleResult
|
||||||
|
pbFriendRequest.Ex = v.Ex
|
||||||
|
pbFriendRequest.HandleMsg = v.HandleMsg
|
||||||
|
pbFriendRequest.ReqMsg = v.ReqMsg
|
||||||
PBFriendRequests = append(PBFriendRequests, pbFriendRequest)
|
PBFriendRequests = append(PBFriendRequests, pbFriendRequest)
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
@ -189,8 +206,11 @@ func (db *DBBlack) DB2PB(ctx context.Context, blacks []*relation.BlackModel) (PB
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, v := range blacks {
|
for _, v := range blacks {
|
||||||
pbBlack := &sdk.BlackInfo{}
|
pbBlack := &sdk.BlackInfo{BlackUserInfo: &sdk.PublicUserInfo{}}
|
||||||
utils.CopyStructFields(pbBlack, users[v.OwnerUserID])
|
pbBlack.OwnerUserID = v.OwnerUserID
|
||||||
|
pbBlack.AddSource = v.AddSource
|
||||||
|
pbBlack.CreateTime = v.CreateTime.Unix()
|
||||||
|
pbBlack.Ex = v.Ex
|
||||||
utils.CopyStructFields(pbBlack.BlackUserInfo, users[v.BlockUserID])
|
utils.CopyStructFields(pbBlack.BlackUserInfo, users[v.BlockUserID])
|
||||||
PBBlacks = append(PBBlacks, pbBlack)
|
PBBlacks = append(PBBlacks, pbBlack)
|
||||||
}
|
}
|
||||||
|
10
pkg/utils/page.go
Normal file
10
pkg/utils/page.go
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
package utils
|
||||||
|
|
||||||
|
import "github.com/OpenIMSDK/Open-IM-Server/pkg/proto/sdkws"
|
||||||
|
|
||||||
|
func GetPage(pagination *sdkws.RequestPagination) (pageNumber, showNumber int32) {
|
||||||
|
if pagination != nil {
|
||||||
|
return pagination.PageNumber, pagination.ShowNumber
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user