From ad261decddbb8f7f2b320794c68a60a21245990e Mon Sep 17 00:00:00 2001 From: Monet Lee Date: Sat, 15 Jun 2024 08:55:47 +0800 Subject: [PATCH] feat: refactor effect of registerUser order. (#555) * feat: refactor effect of register order. * feat: implement checkPhone method in `Chat` and rewrite register user logic. * fix: fix error condition logic. * feat: implement check `Chat` user exist logic. * feat: implement correct is registered logic. --- go.sum | 2 - internal/api/chat/chat.go | 41 +- internal/rpc/chat/user.go | 41 ++ pkg/common/db/database/chat.go | 16 + pkg/common/db/model/chat/account.go | 10 +- pkg/common/db/model/chat/attribute.go | 12 + pkg/common/db/model/chat/register.go | 10 +- pkg/common/db/table/chat/account.go | 1 + pkg/common/db/table/chat/attribute.go | 6 +- pkg/common/db/table/chat/register.go | 3 +- pkg/common/imapi/api.go | 1 + pkg/common/imapi/caller.go | 14 + pkg/protocol/chat/chat.pb.go | 697 +++++++++++++++++++------- pkg/protocol/chat/chat.proto | 138 ++--- pkg/rpclient/chat/chat.go | 10 + 15 files changed, 745 insertions(+), 257 deletions(-) diff --git a/go.sum b/go.sum index e312afb0..012886d2 100644 --- a/go.sum +++ b/go.sum @@ -189,8 +189,6 @@ github.com/openimsdk/gomake v0.0.9 h1:ouf25ygN2PMQ68Gfgns/EQRPiLPnp+77SIr68GfE+n github.com/openimsdk/gomake v0.0.9/go.mod h1:PndCozNc2IsQIciyn9mvEblYWZwJmAI+06z94EY+csI= github.com/openimsdk/protocol v0.0.63 h1:9DnweZe9nEYDFa4fGTbC9Cqi0gLUdtBhRo1NRP2X3WQ= github.com/openimsdk/protocol v0.0.63/go.mod h1:OZQA9FR55lseYoN2Ql1XAHYKHJGu7OMNkUbuekrKCM8= -github.com/openimsdk/tools v0.0.49-alpha.18 h1:ARQeCiRmExvtB6XYItegThuV63JGOTxddwhSLHYXd78= -github.com/openimsdk/tools v0.0.49-alpha.18/go.mod h1:g7mkHXYUPi0/8aAX8VPMHpnb3hqdV69Jph+bXOGvvNM= github.com/openimsdk/tools v0.0.49-alpha.24 h1:lJsqnjTPujnr91LRQ6QmcTliMIa4fMOBSTri6rFz2ek= github.com/openimsdk/tools v0.0.49-alpha.24/go.mod h1:g7mkHXYUPi0/8aAX8VPMHpnb3hqdV69Jph+bXOGvvNM= github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= diff --git a/internal/api/chat/chat.go b/internal/api/chat/chat.go index c8a8c99a..6ab2e4bb 100644 --- a/internal/api/chat/chat.go +++ b/internal/api/chat/chat.go @@ -32,6 +32,7 @@ import ( "github.com/openimsdk/tools/a2r" "github.com/openimsdk/tools/apiresp" "github.com/openimsdk/tools/errs" + "github.com/openimsdk/tools/log" ) func New(chatClient chatpb.ChatClient, adminClient admin.AdminClient, imApiCaller imapi.CallerInterface, api *util.Api) *Api { @@ -88,6 +89,38 @@ func (o *Api) RegisterUser(c *gin.Context) { return } req.Ip = ip + + imToken, err := o.imApiCaller.ImAdminTokenWithDefaultAdmin(c) + if err != nil { + apiresp.GinError(c, err) + return + } + apiCtx := mctx.WithApiToken(c, imToken) + rpcCtx := o.WithAdminUser(c) + + checkResp, err := o.chatClient.CheckUserExist(rpcCtx, &chatpb.CheckUserExistReq{User: req.User}) + if err != nil { + log.ZDebug(rpcCtx, "Not else", errs.Unwrap(err)) + apiresp.GinError(c, err) + return + } + if checkResp.IsRegistered { + isUserNotExist, err := o.imApiCaller.AccountCheckSingle(apiCtx, checkResp.Userid) + if err != nil { + apiresp.GinError(c, err) + return + } + // if User is not exist in SDK server. You need delete this user and register new user again. + if isUserNotExist { + _, err := o.chatClient.DelUserAccount(rpcCtx, &chatpb.DelUserAccountReq{UserIDs: []string{checkResp.Userid}}) + log.ZDebug(c, "Delete Succsssss", checkResp.Userid) + if err != nil { + apiresp.GinError(c, err) + return + } + } + } + respRegisterUser, err := o.chatClient.RegisterUser(c, req) if err != nil { apiresp.GinError(c, err) @@ -104,13 +137,7 @@ func (o *Api) RegisterUser(c *gin.Context) { apiresp.GinError(c, err) return } - imToken, err := o.imApiCaller.ImAdminTokenWithDefaultAdmin(c) - if err != nil { - apiresp.GinError(c, err) - return - } - apiCtx := mctx.WithApiToken(c, imToken) - rpcCtx := o.WithAdminUser(c) + if resp, err := o.adminClient.FindDefaultFriend(rpcCtx, &admin.FindDefaultFriendReq{}); err == nil { _ = o.imApiCaller.ImportFriend(apiCtx, respRegisterUser.UserID, resp.UserIDs) } diff --git a/internal/rpc/chat/user.go b/internal/rpc/chat/user.go index 1dcb88a5..ff53c917 100644 --- a/internal/rpc/chat/user.go +++ b/internal/rpc/chat/user.go @@ -21,7 +21,9 @@ import ( "github.com/openimsdk/chat/pkg/common/db/dbutil" chatdb "github.com/openimsdk/chat/pkg/common/db/table/chat" constantpb "github.com/openimsdk/protocol/constant" + "github.com/openimsdk/tools/log" "github.com/openimsdk/tools/mcontext" + "go.mongodb.org/mongo-driver/mongo" "github.com/openimsdk/chat/pkg/common/constant" "github.com/openimsdk/chat/pkg/common/mctx" @@ -293,3 +295,42 @@ func (o *chatSvr) checkTheUniqueness(ctx context.Context, req *chat.AddUserAccou } return nil } + +func (o *chatSvr) CheckUserExist(ctx context.Context, req *chat.CheckUserExistReq) (resp *chat.CheckUserExistResp, err error) { + if req.User.PhoneNumber != "" { + attributeByPhone, err := o.Database.TakeAttributeByPhone(ctx, req.User.AreaCode, req.User.PhoneNumber) + // err != nil is not found User + if err != nil && errs.Unwrap(err) != mongo.ErrNoDocuments { + return nil, err + } + if attributeByPhone != nil { + log.ZDebug(ctx, "Check Number is ", attributeByPhone.PhoneNumber) + log.ZDebug(ctx, "Check userID is ", attributeByPhone.UserID) + if attributeByPhone.PhoneNumber == req.User.PhoneNumber { + return &chat.CheckUserExistResp{Userid: attributeByPhone.UserID, IsRegistered: true}, nil + } + } + } else { + if req.User.Email != "" { + attributeByEmail, err := o.Database.TakeAttributeByEmail(ctx, req.User.Email) + if err != nil && errs.Unwrap(err) != mongo.ErrNoDocuments { + return nil, err + } + if attributeByEmail != nil { + log.ZDebug(ctx, "Check email is ", attributeByEmail.Email) + log.ZDebug(ctx, "Check userID is ", attributeByEmail.UserID) + if attributeByEmail.Email == req.User.Email { + return &chat.CheckUserExistResp{Userid: attributeByEmail.UserID, IsRegistered: true}, nil + } + } + } + } + return nil, nil +} + +func (o *chatSvr) DelUserAccount(ctx context.Context, req *chat.DelUserAccountReq) (resp *chat.DelUserAccountResp, err error) { + if err := o.Database.DelUserAccount(ctx, req.UserIDs); err != nil && errs.Unwrap(err) != mongo.ErrNoDocuments { + return nil, err + } + return nil, nil +} diff --git a/pkg/common/db/database/chat.go b/pkg/common/db/database/chat.go index ea66dcb6..e618845a 100644 --- a/pkg/common/db/database/chat.go +++ b/pkg/common/db/database/chat.go @@ -57,6 +57,7 @@ type ChatDatabaseInterface interface { NewUserCountTotal(ctx context.Context, before *time.Time) (int64, error) UserLoginCountTotal(ctx context.Context, before *time.Time) (int64, error) UserLoginCountRangeEverydayTotal(ctx context.Context, start *time.Time, end *time.Time) (map[string]int64, int64, error) + DelUserAccount(ctx context.Context, userIDs []string) error } func NewChatDatabase(cli *mongoutil.Client) (ChatDatabaseInterface, error) { @@ -260,3 +261,18 @@ func (o *ChatDatabase) UserLoginCountTotal(ctx context.Context, before *time.Tim func (o *ChatDatabase) UserLoginCountRangeEverydayTotal(ctx context.Context, start *time.Time, end *time.Time) (map[string]int64, int64, error) { return o.userLoginRecord.CountRangeEverydayTotal(ctx, start, end) } + +func (o *ChatDatabase) DelUserAccount(ctx context.Context, userIDs []string) error { + return o.tx.Transaction(ctx, func(ctx context.Context) error { + if err := o.register.Delete(ctx, userIDs); err != nil { + return err + } + if err := o.account.Delete(ctx, userIDs); err != nil { + return err + } + if err := o.attribute.Delete(ctx, userIDs); err != nil { + return err + } + return nil + }) +} diff --git a/pkg/common/db/model/chat/account.go b/pkg/common/db/model/chat/account.go index 4ca37bf4..c9c8fa9c 100644 --- a/pkg/common/db/model/chat/account.go +++ b/pkg/common/db/model/chat/account.go @@ -16,12 +16,13 @@ package chat import ( "context" + "time" + "github.com/openimsdk/tools/db/mongoutil" "github.com/openimsdk/tools/errs" "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/options" - "time" "github.com/openimsdk/chat/pkg/common/db/table/chat" ) @@ -62,3 +63,10 @@ func (o *Account) Update(ctx context.Context, userID string, data map[string]any func (o *Account) UpdatePassword(ctx context.Context, userId string, password string) error { return mongoutil.UpdateOne(ctx, o.coll, bson.M{"user_id": userId}, bson.M{"$set": bson.M{"password": password, "change_time": time.Now()}}, false) } + +func (o *Account) Delete(ctx context.Context, userIDs []string) error { + if len(userIDs) == 0 { + return nil + } + return mongoutil.DeleteMany(ctx, o.coll, bson.M{"user_id": bson.M{"$in": userIDs}}) +} diff --git a/pkg/common/db/model/chat/attribute.go b/pkg/common/db/model/chat/attribute.go index f01549aa..9b83b2df 100644 --- a/pkg/common/db/model/chat/attribute.go +++ b/pkg/common/db/model/chat/attribute.go @@ -16,6 +16,7 @@ package chat import ( "context" + "github.com/openimsdk/tools/db/mongoutil" "github.com/openimsdk/tools/db/pagination" "github.com/openimsdk/tools/errs" @@ -81,6 +82,10 @@ func (o *Attribute) FindAccount(ctx context.Context, accounts []string) ([]*chat return mongoutil.Find[*chat.Attribute](ctx, o.coll, bson.M{"account": bson.M{"$in": accounts}}) } +func (o *Attribute) FindPhone(ctx context.Context, phoneNumbers []string) ([]*chat.Attribute, error) { + return mongoutil.Find[*chat.Attribute](ctx, o.coll, bson.M{"phone_number": bson.M{"$in": phoneNumbers}}) +} + func (o *Attribute) Search(ctx context.Context, keyword string, genders []int32, pagination pagination.Pagination) (int64, []*chat.Attribute, error) { filter := bson.M{} if len(genders) > 0 { @@ -162,3 +167,10 @@ func (o *Attribute) SearchUser(ctx context.Context, keyword string, userIDs []st } return mongoutil.FindPage[*chat.Attribute](ctx, o.coll, filter, pagination) } + +func (o *Attribute) Delete(ctx context.Context, userIDs []string) error { + if len(userIDs) == 0 { + return nil + } + return mongoutil.DeleteMany(ctx, o.coll, bson.M{"user_id": bson.M{"$in": userIDs}}) +} diff --git a/pkg/common/db/model/chat/register.go b/pkg/common/db/model/chat/register.go index 38695b56..b4784331 100644 --- a/pkg/common/db/model/chat/register.go +++ b/pkg/common/db/model/chat/register.go @@ -16,11 +16,12 @@ package chat import ( "context" + "time" + "github.com/openimsdk/tools/db/mongoutil" "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/mongo/options" - "time" "github.com/openimsdk/chat/pkg/common/db/table/chat" "github.com/openimsdk/tools/errs" @@ -57,3 +58,10 @@ func (o *Register) CountTotal(ctx context.Context, before *time.Time) (int64, er } return mongoutil.Count(ctx, o.coll, filter) } + +func (o *Register) Delete(ctx context.Context, userIDs []string) error { + if len(userIDs) == 0 { + return nil + } + return mongoutil.DeleteMany(ctx, o.coll, bson.M{"user_id": bson.M{"$in": userIDs}}) +} diff --git a/pkg/common/db/table/chat/account.go b/pkg/common/db/table/chat/account.go index dba6d68d..16297509 100644 --- a/pkg/common/db/table/chat/account.go +++ b/pkg/common/db/table/chat/account.go @@ -36,4 +36,5 @@ type AccountInterface interface { Take(ctx context.Context, userId string) (*Account, error) Update(ctx context.Context, userID string, data map[string]any) error UpdatePassword(ctx context.Context, userId string, password string) error + Delete(ctx context.Context, userIDs []string) error } diff --git a/pkg/common/db/table/chat/attribute.go b/pkg/common/db/table/chat/attribute.go index 57f62f7e..d77f0617 100644 --- a/pkg/common/db/table/chat/attribute.go +++ b/pkg/common/db/table/chat/attribute.go @@ -16,8 +16,9 @@ package chat import ( "context" - "github.com/openimsdk/tools/db/pagination" "time" + + "github.com/openimsdk/tools/db/pagination" ) type Attribute struct { @@ -45,7 +46,7 @@ func (Attribute) TableName() string { } type AttributeInterface interface { - //NewTx(tx any) AttributeInterface + // NewTx(tx any) AttributeInterface Create(ctx context.Context, attribute ...*Attribute) error Update(ctx context.Context, userID string, data map[string]any) error Find(ctx context.Context, userIds []string) ([]*Attribute, error) @@ -57,4 +58,5 @@ type AttributeInterface interface { Take(ctx context.Context, userID string) (*Attribute, error) SearchNormalUser(ctx context.Context, keyword string, forbiddenID []string, gender int32, pagination pagination.Pagination) (int64, []*Attribute, error) SearchUser(ctx context.Context, keyword string, userIDs []string, genders []int32, pagination pagination.Pagination) (int64, []*Attribute, error) + Delete(ctx context.Context, userIDs []string) error } diff --git a/pkg/common/db/table/chat/register.go b/pkg/common/db/table/chat/register.go index 647037ef..05d15477 100644 --- a/pkg/common/db/table/chat/register.go +++ b/pkg/common/db/table/chat/register.go @@ -34,7 +34,8 @@ func (Register) TableName() string { } type RegisterInterface interface { - //NewTx(tx any) RegisterInterface + // NewTx(tx any) RegisterInterface Create(ctx context.Context, registers ...*Register) error CountTotal(ctx context.Context, before *time.Time) (int64, error) + Delete(ctx context.Context, userIDs []string) error } diff --git a/pkg/common/imapi/api.go b/pkg/common/imapi/api.go index d5c6cca1..6d5aff2f 100644 --- a/pkg/common/imapi/api.go +++ b/pkg/common/imapi/api.go @@ -32,4 +32,5 @@ var ( getGroupsInfo = NewApiCaller[group.GetGroupsInfoReq, group.GetGroupsInfoResp]("/group/get_groups_info") registerUserCount = NewApiCaller[user.UserRegisterCountReq, user.UserRegisterCountResp]("/statistics/user/register") friendUserIDs = NewApiCaller[friend.GetFriendIDsReq, friend.GetFriendIDsResp]("/friend/get_friend_id") + accountCheck = NewApiCaller[user.AccountCheckReq, user.AccountCheckResp]("/user/account_check") ) diff --git a/pkg/common/imapi/caller.go b/pkg/common/imapi/caller.go index cfe0db68..c6ca3f1e 100644 --- a/pkg/common/imapi/caller.go +++ b/pkg/common/imapi/caller.go @@ -19,6 +19,7 @@ import ( "sync" "time" + "github.com/openimsdk/chat/pkg/eerrs" "github.com/openimsdk/tools/log" "github.com/openimsdk/protocol/auth" @@ -40,6 +41,7 @@ type CallerInterface interface { FindGroupInfo(ctx context.Context, groupIDs []string) ([]*sdkws.GroupInfo, error) UserRegisterCount(ctx context.Context, start int64, end int64) (map[string]int64, int64, error) FriendUserIDs(ctx context.Context, userID string) ([]string, error) + AccountCheckSingle(ctx context.Context, userID string) (bool, error) } type Caller struct { @@ -165,3 +167,15 @@ func (c *Caller) FriendUserIDs(ctx context.Context, userID string) ([]string, er } return resp.FriendIDs, nil } + +// return true when isUserNotExist. +func (c *Caller) AccountCheckSingle(ctx context.Context, userID string) (bool, error) { + resp, err := accountCheck.Call(ctx, c.imApi, &user.AccountCheckReq{CheckUserIDs: []string{userID}}) + if err != nil { + return false, err + } + if resp.Results[0].AccountStatus == "registered" { + return false, eerrs.ErrAccountAlreadyRegister.Wrap() + } + return true, nil +} diff --git a/pkg/protocol/chat/chat.pb.go b/pkg/protocol/chat/chat.pb.go index 16b85c93..992e9b2e 100644 --- a/pkg/protocol/chat/chat.pb.go +++ b/pkg/protocol/chat/chat.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.33.0 -// protoc v5.26.0 +// protoc v5.27.1 // source: chat/chat.proto package chat @@ -2580,15 +2580,202 @@ func (x *GetTokenForVideoMeetingResp) GetToken() string { return "" } +type CheckUserExistReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + User *RegisterUserInfo `protobuf:"bytes,1,opt,name=user,proto3" json:"user"` +} + +func (x *CheckUserExistReq) Reset() { + *x = CheckUserExistReq{} + if protoimpl.UnsafeEnabled { + mi := &file_chat_chat_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckUserExistReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckUserExistReq) ProtoMessage() {} + +func (x *CheckUserExistReq) ProtoReflect() protoreflect.Message { + mi := &file_chat_chat_proto_msgTypes[39] + 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 CheckUserExistReq.ProtoReflect.Descriptor instead. +func (*CheckUserExistReq) Descriptor() ([]byte, []int) { + return file_chat_chat_proto_rawDescGZIP(), []int{39} +} + +func (x *CheckUserExistReq) GetUser() *RegisterUserInfo { + if x != nil { + return x.User + } + return nil +} + +type CheckUserExistResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Userid string `protobuf:"bytes,1,opt,name=userid,proto3" json:"userid"` + IsRegistered bool `protobuf:"varint,2,opt,name=isRegistered,proto3" json:"isRegistered"` +} + +func (x *CheckUserExistResp) Reset() { + *x = CheckUserExistResp{} + if protoimpl.UnsafeEnabled { + mi := &file_chat_chat_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckUserExistResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckUserExistResp) ProtoMessage() {} + +func (x *CheckUserExistResp) ProtoReflect() protoreflect.Message { + mi := &file_chat_chat_proto_msgTypes[40] + 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 CheckUserExistResp.ProtoReflect.Descriptor instead. +func (*CheckUserExistResp) Descriptor() ([]byte, []int) { + return file_chat_chat_proto_rawDescGZIP(), []int{40} +} + +func (x *CheckUserExistResp) GetUserid() string { + if x != nil { + return x.Userid + } + return "" +} + +func (x *CheckUserExistResp) GetIsRegistered() bool { + if x != nil { + return x.IsRegistered + } + return false +} + +type DelUserAccountReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserIDs []string `protobuf:"bytes,1,rep,name=userIDs,proto3" json:"userIDs"` +} + +func (x *DelUserAccountReq) Reset() { + *x = DelUserAccountReq{} + if protoimpl.UnsafeEnabled { + mi := &file_chat_chat_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DelUserAccountReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DelUserAccountReq) ProtoMessage() {} + +func (x *DelUserAccountReq) ProtoReflect() protoreflect.Message { + mi := &file_chat_chat_proto_msgTypes[41] + 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 DelUserAccountReq.ProtoReflect.Descriptor instead. +func (*DelUserAccountReq) Descriptor() ([]byte, []int) { + return file_chat_chat_proto_rawDescGZIP(), []int{41} +} + +func (x *DelUserAccountReq) GetUserIDs() []string { + if x != nil { + return x.UserIDs + } + return nil +} + +type DelUserAccountResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DelUserAccountResp) Reset() { + *x = DelUserAccountResp{} + if protoimpl.UnsafeEnabled { + mi := &file_chat_chat_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DelUserAccountResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DelUserAccountResp) ProtoMessage() {} + +func (x *DelUserAccountResp) ProtoReflect() protoreflect.Message { + mi := &file_chat_chat_proto_msgTypes[42] + 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 DelUserAccountResp.ProtoReflect.Descriptor instead. +func (*DelUserAccountResp) Descriptor() ([]byte, []int) { + return file_chat_chat_proto_rawDescGZIP(), []int{42} +} + var File_chat_chat_proto protoreflect.FileDescriptor var file_chat_chat_proto_rawDesc = []byte{ 0x0a, 0x0f, 0x63, 0x68, 0x61, 0x74, 0x2f, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x0b, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x1a, 0x1b, - 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x70, 0x62, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, - 0x65, 0x72, 0x73, 0x70, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x73, 0x64, 0x6b, - 0x77, 0x73, 0x2f, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, + 0x6f, 0x12, 0x0b, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x1a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x73, 0x64, 0x6b, 0x77, 0x73, 0x2f, 0x73, 0x64, 0x6b, 0x77, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, + 0x70, 0x62, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x70, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb4, 0x01, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x72, @@ -2935,106 +3122,131 @@ var file_chat_chat_proto_rawDesc = []byte{ 0x73, 0x70, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x55, 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xfd, 0x0b, 0x0a, 0x04, 0x63, 0x68, 0x61, 0x74, 0x12, - 0x51, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, - 0x71, 0x1a, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x51, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, - 0x61, 0x74, 0x2e, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, - 0x61, 0x74, 0x2e, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x63, 0x0a, 0x14, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, - 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x24, 0x2e, - 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, - 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x65, 0x71, 0x1a, 0x25, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, - 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5d, 0x0a, 0x12, 0x46, 0x69, + 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x46, 0x0a, 0x11, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, + 0x73, 0x65, 0x72, 0x45, 0x78, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x31, 0x0a, 0x04, 0x75, + 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, + 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x50, + 0x0a, 0x12, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x45, 0x78, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x0c, + 0x69, 0x73, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x0c, 0x69, 0x73, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, + 0x22, 0x2d, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x73, 0x22, + 0x14, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x32, 0xa3, 0x0d, 0x0a, 0x04, 0x63, 0x68, 0x61, 0x74, 0x12, 0x51, + 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, + 0x1a, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x51, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, + 0x74, 0x2e, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, + 0x74, 0x2e, 0x41, 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x63, 0x0a, 0x14, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, + 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x24, 0x2e, 0x6f, + 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x71, 0x1a, 0x25, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, + 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5d, 0x0a, 0x12, 0x46, 0x69, 0x6e, + 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, 0x6f, - 0x12, 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, - 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, - 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5d, 0x0a, 0x12, 0x53, 0x65, 0x61, - 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x22, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, - 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, - 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x57, 0x0a, 0x10, 0x46, 0x69, 0x6e, 0x64, - 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x2e, 0x6f, - 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, - 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x21, - 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, - 0x64, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x51, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, - 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, - 0x74, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, - 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, - 0x74, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x45, 0x0a, 0x0a, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, - 0x64, 0x65, 0x12, 0x1a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, - 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1b, - 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x56, 0x65, 0x72, - 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4b, 0x0a, 0x0c, 0x52, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x6f, 0x70, - 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, - 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x36, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, - 0x6e, 0x12, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, - 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, - 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x4e, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, - 0x64, 0x12, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, - 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, - 0x1a, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, - 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, - 0x12, 0x51, 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, - 0x72, 0x64, 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, - 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, - 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, - 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x54, 0x0a, 0x0f, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, - 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, - 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x54, 0x0a, 0x0f, 0x46, 0x69, 0x6e, - 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x6f, - 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, + 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x5d, 0x0a, 0x12, 0x53, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x22, + 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x61, + 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x71, 0x1a, 0x23, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, + 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x57, 0x0a, 0x10, 0x46, 0x69, 0x6e, 0x64, 0x55, + 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x20, 0x2e, 0x6f, 0x70, + 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, + 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x51, 0x0a, 0x0e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, - 0x6b, 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, + 0x55, 0x73, 0x65, 0x72, 0x46, 0x75, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x51, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, + 0x64, 0x65, 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, + 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, + 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, + 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x45, 0x0a, 0x0a, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, + 0x65, 0x12, 0x1a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, + 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, + 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x56, 0x65, 0x72, 0x69, + 0x66, 0x79, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4b, 0x0a, 0x0c, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1c, 0x2e, 0x6f, 0x70, 0x65, + 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, + 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x55, + 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x36, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, + 0x12, 0x15, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4c, + 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, + 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x4e, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, + 0x12, 0x1d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, + 0x65, 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x1a, + 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, 0x65, + 0x73, 0x65, 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x51, 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, - 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, - 0x73, 0x70, 0x12, 0x51, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, - 0x61, 0x74, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, + 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x12, 0x51, 0x0a, 0x0e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x45, + 0x78, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, + 0x61, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x45, 0x78, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, - 0x61, 0x74, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x51, 0x0a, 0x0e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, - 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, - 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, - 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x6c, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x46, 0x6f, 0x72, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x4d, 0x65, 0x65, 0x74, - 0x69, 0x6e, 0x67, 0x12, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, - 0x74, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x46, 0x6f, 0x72, 0x56, 0x69, 0x64, - 0x65, 0x6f, 0x4d, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x28, 0x2e, 0x6f, - 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x46, 0x6f, 0x72, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x4d, 0x65, 0x65, 0x74, 0x69, - 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x73, 0x64, 0x6b, 0x2f, 0x63, - 0x68, 0x61, 0x74, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x2f, 0x63, 0x68, 0x61, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x45, 0x78, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x51, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x55, 0x73, 0x65, 0x72, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, + 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, + 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x44, 0x65, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x54, 0x0a, 0x0f, 0x46, 0x69, 0x6e, 0x64, + 0x55, 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1f, 0x2e, 0x6f, 0x70, + 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, 0x73, + 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x6f, + 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x55, + 0x73, 0x65, 0x72, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x54, + 0x0a, 0x0f, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, + 0x72, 0x12, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, + 0x46, 0x69, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, + 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x51, 0x0a, 0x0e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x61, + 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, + 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x61, 0x6c, 0x6c, 0x62, + 0x61, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, + 0x63, 0x68, 0x61, 0x74, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x43, 0x61, 0x6c, 0x6c, 0x62, + 0x61, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x51, 0x0a, 0x0e, 0x55, 0x73, 0x65, 0x72, 0x4c, + 0x6f, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, + 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, + 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, + 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x6f, 0x67, 0x69, + 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x51, 0x0a, 0x0e, 0x53, 0x65, + 0x61, 0x72, 0x63, 0x68, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1e, 0x2e, 0x6f, + 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6f, + 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x12, 0x6c, 0x0a, + 0x17, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x46, 0x6f, 0x72, 0x56, 0x69, 0x64, 0x65, + 0x6f, 0x4d, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x27, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, + 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x46, + 0x6f, 0x72, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x4d, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x71, 0x1a, 0x28, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, + 0x47, 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x46, 0x6f, 0x72, 0x56, 0x69, 0x64, 0x65, 0x6f, + 0x4d, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x42, 0x2d, 0x5a, 0x2b, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x6d, + 0x73, 0x64, 0x6b, 0x2f, 0x63, 0x68, 0x61, 0x74, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x63, 0x68, 0x61, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -3049,7 +3261,7 @@ func file_chat_chat_proto_rawDescGZIP() []byte { return file_chat_chat_proto_rawDescData } -var file_chat_chat_proto_msgTypes = make([]protoimpl.MessageInfo, 42) +var file_chat_chat_proto_msgTypes = make([]protoimpl.MessageInfo, 46) var file_chat_chat_proto_goTypes = []interface{}{ (*UserIdentity)(nil), // 0: openim.chat.UserIdentity (*UpdateUserInfoReq)(nil), // 1: openim.chat.UpdateUserInfoReq @@ -3090,86 +3302,95 @@ var file_chat_chat_proto_goTypes = []interface{}{ (*SearchUserInfoResp)(nil), // 36: openim.chat.SearchUserInfoResp (*GetTokenForVideoMeetingReq)(nil), // 37: openim.chat.GetTokenForVideoMeetingReq (*GetTokenForVideoMeetingResp)(nil), // 38: openim.chat.GetTokenForVideoMeetingResp - nil, // 39: openim.chat.FindUserAccountResp.UserAccountMapEntry - nil, // 40: openim.chat.FindAccountUserResp.AccountUserMapEntry - nil, // 41: openim.chat.UserLoginCountResp.CountEntry - (*wrapperspb.StringValue)(nil), // 42: openim.protobuf.StringValue - (*wrapperspb.Int32Value)(nil), // 43: openim.protobuf.Int32Value - (*wrapperspb.Int64Value)(nil), // 44: openim.protobuf.Int64Value - (*common.UserPublicInfo)(nil), // 45: openim.chat.common.UserPublicInfo - (*sdkws.RequestPagination)(nil), // 46: openim.sdkws.RequestPagination - (*common.UserFullInfo)(nil), // 47: openim.chat.common.UserFullInfo + (*CheckUserExistReq)(nil), // 39: openim.chat.CheckUserExistReq + (*CheckUserExistResp)(nil), // 40: openim.chat.CheckUserExistResp + (*DelUserAccountReq)(nil), // 41: openim.chat.DelUserAccountReq + (*DelUserAccountResp)(nil), // 42: openim.chat.DelUserAccountResp + nil, // 43: openim.chat.FindUserAccountResp.UserAccountMapEntry + nil, // 44: openim.chat.FindAccountUserResp.AccountUserMapEntry + nil, // 45: openim.chat.UserLoginCountResp.CountEntry + (*wrapperspb.StringValue)(nil), // 46: openim.protobuf.StringValue + (*wrapperspb.Int32Value)(nil), // 47: openim.protobuf.Int32Value + (*wrapperspb.Int64Value)(nil), // 48: openim.protobuf.Int64Value + (*common.UserPublicInfo)(nil), // 49: openim.chat.common.UserPublicInfo + (*sdkws.RequestPagination)(nil), // 50: openim.sdkws.RequestPagination + (*common.UserFullInfo)(nil), // 51: openim.chat.common.UserFullInfo } var file_chat_chat_proto_depIdxs = []int32{ - 42, // 0: openim.chat.UpdateUserInfoReq.account:type_name -> openim.protobuf.StringValue - 42, // 1: openim.chat.UpdateUserInfoReq.phoneNumber:type_name -> openim.protobuf.StringValue - 42, // 2: openim.chat.UpdateUserInfoReq.areaCode:type_name -> openim.protobuf.StringValue - 42, // 3: openim.chat.UpdateUserInfoReq.email:type_name -> openim.protobuf.StringValue - 42, // 4: openim.chat.UpdateUserInfoReq.nickname:type_name -> openim.protobuf.StringValue - 42, // 5: openim.chat.UpdateUserInfoReq.faceURL:type_name -> openim.protobuf.StringValue - 43, // 6: openim.chat.UpdateUserInfoReq.gender:type_name -> openim.protobuf.Int32Value - 43, // 7: openim.chat.UpdateUserInfoReq.level:type_name -> openim.protobuf.Int32Value - 44, // 8: openim.chat.UpdateUserInfoReq.birth:type_name -> openim.protobuf.Int64Value - 43, // 9: openim.chat.UpdateUserInfoReq.allowAddFriend:type_name -> openim.protobuf.Int32Value - 43, // 10: openim.chat.UpdateUserInfoReq.allowBeep:type_name -> openim.protobuf.Int32Value - 43, // 11: openim.chat.UpdateUserInfoReq.allowVibration:type_name -> openim.protobuf.Int32Value - 43, // 12: openim.chat.UpdateUserInfoReq.globalRecvMsgOpt:type_name -> openim.protobuf.Int32Value - 43, // 13: openim.chat.UpdateUserInfoReq.RegisterType:type_name -> openim.protobuf.Int32Value - 45, // 14: openim.chat.FindUserPublicInfoResp.users:type_name -> openim.chat.common.UserPublicInfo - 46, // 15: openim.chat.SearchUserPublicInfoReq.pagination:type_name -> openim.sdkws.RequestPagination - 45, // 16: openim.chat.SearchUserPublicInfoResp.users:type_name -> openim.chat.common.UserPublicInfo - 47, // 17: openim.chat.FindUserFullInfoResp.users:type_name -> openim.chat.common.UserFullInfo + 46, // 0: openim.chat.UpdateUserInfoReq.account:type_name -> openim.protobuf.StringValue + 46, // 1: openim.chat.UpdateUserInfoReq.phoneNumber:type_name -> openim.protobuf.StringValue + 46, // 2: openim.chat.UpdateUserInfoReq.areaCode:type_name -> openim.protobuf.StringValue + 46, // 3: openim.chat.UpdateUserInfoReq.email:type_name -> openim.protobuf.StringValue + 46, // 4: openim.chat.UpdateUserInfoReq.nickname:type_name -> openim.protobuf.StringValue + 46, // 5: openim.chat.UpdateUserInfoReq.faceURL:type_name -> openim.protobuf.StringValue + 47, // 6: openim.chat.UpdateUserInfoReq.gender:type_name -> openim.protobuf.Int32Value + 47, // 7: openim.chat.UpdateUserInfoReq.level:type_name -> openim.protobuf.Int32Value + 48, // 8: openim.chat.UpdateUserInfoReq.birth:type_name -> openim.protobuf.Int64Value + 47, // 9: openim.chat.UpdateUserInfoReq.allowAddFriend:type_name -> openim.protobuf.Int32Value + 47, // 10: openim.chat.UpdateUserInfoReq.allowBeep:type_name -> openim.protobuf.Int32Value + 47, // 11: openim.chat.UpdateUserInfoReq.allowVibration:type_name -> openim.protobuf.Int32Value + 47, // 12: openim.chat.UpdateUserInfoReq.globalRecvMsgOpt:type_name -> openim.protobuf.Int32Value + 47, // 13: openim.chat.UpdateUserInfoReq.RegisterType:type_name -> openim.protobuf.Int32Value + 49, // 14: openim.chat.FindUserPublicInfoResp.users:type_name -> openim.chat.common.UserPublicInfo + 50, // 15: openim.chat.SearchUserPublicInfoReq.pagination:type_name -> openim.sdkws.RequestPagination + 49, // 16: openim.chat.SearchUserPublicInfoResp.users:type_name -> openim.chat.common.UserPublicInfo + 51, // 17: openim.chat.FindUserFullInfoResp.users:type_name -> openim.chat.common.UserFullInfo 13, // 18: openim.chat.RegisterUserReq.user:type_name -> openim.chat.RegisterUserInfo 13, // 19: openim.chat.AddUserAccountReq.user:type_name -> openim.chat.RegisterUserInfo - 39, // 20: openim.chat.FindUserAccountResp.userAccountMap:type_name -> openim.chat.FindUserAccountResp.UserAccountMapEntry - 40, // 21: openim.chat.FindAccountUserResp.accountUserMap:type_name -> openim.chat.FindAccountUserResp.AccountUserMapEntry - 45, // 22: openim.chat.SignalRecord.inviterUserList:type_name -> openim.chat.common.UserPublicInfo - 46, // 23: openim.chat.SearchUserFullInfoReq.pagination:type_name -> openim.sdkws.RequestPagination - 47, // 24: openim.chat.SearchUserFullInfoResp.users:type_name -> openim.chat.common.UserFullInfo - 41, // 25: openim.chat.UserLoginCountResp.count:type_name -> openim.chat.UserLoginCountResp.CountEntry - 46, // 26: openim.chat.SearchUserInfoReq.pagination:type_name -> openim.sdkws.RequestPagination - 47, // 27: openim.chat.SearchUserInfoResp.users:type_name -> openim.chat.common.UserFullInfo - 1, // 28: openim.chat.chat.UpdateUserInfo:input_type -> openim.chat.UpdateUserInfoReq - 16, // 29: openim.chat.chat.AddUserAccount:input_type -> openim.chat.AddUserAccountReq - 5, // 30: openim.chat.chat.SearchUserPublicInfo:input_type -> openim.chat.SearchUserPublicInfoReq - 3, // 31: openim.chat.chat.FindUserPublicInfo:input_type -> openim.chat.FindUserPublicInfoReq - 30, // 32: openim.chat.chat.SearchUserFullInfo:input_type -> openim.chat.SearchUserFullInfoReq - 7, // 33: openim.chat.chat.FindUserFullInfo:input_type -> openim.chat.FindUserFullInfoReq - 9, // 34: openim.chat.chat.SendVerifyCode:input_type -> openim.chat.SendVerifyCodeReq - 11, // 35: openim.chat.chat.VerifyCode:input_type -> openim.chat.VerifyCodeReq - 14, // 36: openim.chat.chat.RegisterUser:input_type -> openim.chat.RegisterUserReq - 18, // 37: openim.chat.chat.Login:input_type -> openim.chat.LoginReq - 19, // 38: openim.chat.chat.ResetPassword:input_type -> openim.chat.ResetPasswordReq - 21, // 39: openim.chat.chat.ChangePassword:input_type -> openim.chat.ChangePasswordReq - 23, // 40: openim.chat.chat.FindUserAccount:input_type -> openim.chat.FindUserAccountReq - 25, // 41: openim.chat.chat.FindAccountUser:input_type -> openim.chat.FindAccountUserReq - 28, // 42: openim.chat.chat.OpenIMCallback:input_type -> openim.chat.OpenIMCallbackReq - 32, // 43: openim.chat.chat.UserLoginCount:input_type -> openim.chat.UserLoginCountReq - 35, // 44: openim.chat.chat.SearchUserInfo:input_type -> openim.chat.SearchUserInfoReq - 37, // 45: openim.chat.chat.GetTokenForVideoMeeting:input_type -> openim.chat.GetTokenForVideoMeetingReq - 2, // 46: openim.chat.chat.UpdateUserInfo:output_type -> openim.chat.UpdateUserInfoResp - 17, // 47: openim.chat.chat.AddUserAccount:output_type -> openim.chat.AddUserAccountResp - 6, // 48: openim.chat.chat.SearchUserPublicInfo:output_type -> openim.chat.SearchUserPublicInfoResp - 4, // 49: openim.chat.chat.FindUserPublicInfo:output_type -> openim.chat.FindUserPublicInfoResp - 31, // 50: openim.chat.chat.SearchUserFullInfo:output_type -> openim.chat.SearchUserFullInfoResp - 8, // 51: openim.chat.chat.FindUserFullInfo:output_type -> openim.chat.FindUserFullInfoResp - 10, // 52: openim.chat.chat.SendVerifyCode:output_type -> openim.chat.SendVerifyCodeResp - 12, // 53: openim.chat.chat.VerifyCode:output_type -> openim.chat.VerifyCodeResp - 15, // 54: openim.chat.chat.RegisterUser:output_type -> openim.chat.RegisterUserResp - 34, // 55: openim.chat.chat.Login:output_type -> openim.chat.LoginResp - 20, // 56: openim.chat.chat.ResetPassword:output_type -> openim.chat.ResetPasswordResp - 22, // 57: openim.chat.chat.ChangePassword:output_type -> openim.chat.ChangePasswordResp - 24, // 58: openim.chat.chat.FindUserAccount:output_type -> openim.chat.FindUserAccountResp - 26, // 59: openim.chat.chat.FindAccountUser:output_type -> openim.chat.FindAccountUserResp - 29, // 60: openim.chat.chat.OpenIMCallback:output_type -> openim.chat.OpenIMCallbackResp - 33, // 61: openim.chat.chat.UserLoginCount:output_type -> openim.chat.UserLoginCountResp - 36, // 62: openim.chat.chat.SearchUserInfo:output_type -> openim.chat.SearchUserInfoResp - 38, // 63: openim.chat.chat.GetTokenForVideoMeeting:output_type -> openim.chat.GetTokenForVideoMeetingResp - 46, // [46:64] is the sub-list for method output_type - 28, // [28:46] is the sub-list for method input_type - 28, // [28:28] is the sub-list for extension type_name - 28, // [28:28] is the sub-list for extension extendee - 0, // [0:28] is the sub-list for field type_name + 43, // 20: openim.chat.FindUserAccountResp.userAccountMap:type_name -> openim.chat.FindUserAccountResp.UserAccountMapEntry + 44, // 21: openim.chat.FindAccountUserResp.accountUserMap:type_name -> openim.chat.FindAccountUserResp.AccountUserMapEntry + 49, // 22: openim.chat.SignalRecord.inviterUserList:type_name -> openim.chat.common.UserPublicInfo + 50, // 23: openim.chat.SearchUserFullInfoReq.pagination:type_name -> openim.sdkws.RequestPagination + 51, // 24: openim.chat.SearchUserFullInfoResp.users:type_name -> openim.chat.common.UserFullInfo + 45, // 25: openim.chat.UserLoginCountResp.count:type_name -> openim.chat.UserLoginCountResp.CountEntry + 50, // 26: openim.chat.SearchUserInfoReq.pagination:type_name -> openim.sdkws.RequestPagination + 51, // 27: openim.chat.SearchUserInfoResp.users:type_name -> openim.chat.common.UserFullInfo + 13, // 28: openim.chat.CheckUserExistReq.user:type_name -> openim.chat.RegisterUserInfo + 1, // 29: openim.chat.chat.UpdateUserInfo:input_type -> openim.chat.UpdateUserInfoReq + 16, // 30: openim.chat.chat.AddUserAccount:input_type -> openim.chat.AddUserAccountReq + 5, // 31: openim.chat.chat.SearchUserPublicInfo:input_type -> openim.chat.SearchUserPublicInfoReq + 3, // 32: openim.chat.chat.FindUserPublicInfo:input_type -> openim.chat.FindUserPublicInfoReq + 30, // 33: openim.chat.chat.SearchUserFullInfo:input_type -> openim.chat.SearchUserFullInfoReq + 7, // 34: openim.chat.chat.FindUserFullInfo:input_type -> openim.chat.FindUserFullInfoReq + 9, // 35: openim.chat.chat.SendVerifyCode:input_type -> openim.chat.SendVerifyCodeReq + 11, // 36: openim.chat.chat.VerifyCode:input_type -> openim.chat.VerifyCodeReq + 14, // 37: openim.chat.chat.RegisterUser:input_type -> openim.chat.RegisterUserReq + 18, // 38: openim.chat.chat.Login:input_type -> openim.chat.LoginReq + 19, // 39: openim.chat.chat.ResetPassword:input_type -> openim.chat.ResetPasswordReq + 21, // 40: openim.chat.chat.ChangePassword:input_type -> openim.chat.ChangePasswordReq + 39, // 41: openim.chat.chat.CheckUserExist:input_type -> openim.chat.CheckUserExistReq + 41, // 42: openim.chat.chat.DelUserAccount:input_type -> openim.chat.DelUserAccountReq + 23, // 43: openim.chat.chat.FindUserAccount:input_type -> openim.chat.FindUserAccountReq + 25, // 44: openim.chat.chat.FindAccountUser:input_type -> openim.chat.FindAccountUserReq + 28, // 45: openim.chat.chat.OpenIMCallback:input_type -> openim.chat.OpenIMCallbackReq + 32, // 46: openim.chat.chat.UserLoginCount:input_type -> openim.chat.UserLoginCountReq + 35, // 47: openim.chat.chat.SearchUserInfo:input_type -> openim.chat.SearchUserInfoReq + 37, // 48: openim.chat.chat.GetTokenForVideoMeeting:input_type -> openim.chat.GetTokenForVideoMeetingReq + 2, // 49: openim.chat.chat.UpdateUserInfo:output_type -> openim.chat.UpdateUserInfoResp + 17, // 50: openim.chat.chat.AddUserAccount:output_type -> openim.chat.AddUserAccountResp + 6, // 51: openim.chat.chat.SearchUserPublicInfo:output_type -> openim.chat.SearchUserPublicInfoResp + 4, // 52: openim.chat.chat.FindUserPublicInfo:output_type -> openim.chat.FindUserPublicInfoResp + 31, // 53: openim.chat.chat.SearchUserFullInfo:output_type -> openim.chat.SearchUserFullInfoResp + 8, // 54: openim.chat.chat.FindUserFullInfo:output_type -> openim.chat.FindUserFullInfoResp + 10, // 55: openim.chat.chat.SendVerifyCode:output_type -> openim.chat.SendVerifyCodeResp + 12, // 56: openim.chat.chat.VerifyCode:output_type -> openim.chat.VerifyCodeResp + 15, // 57: openim.chat.chat.RegisterUser:output_type -> openim.chat.RegisterUserResp + 34, // 58: openim.chat.chat.Login:output_type -> openim.chat.LoginResp + 20, // 59: openim.chat.chat.ResetPassword:output_type -> openim.chat.ResetPasswordResp + 22, // 60: openim.chat.chat.ChangePassword:output_type -> openim.chat.ChangePasswordResp + 40, // 61: openim.chat.chat.CheckUserExist:output_type -> openim.chat.CheckUserExistResp + 42, // 62: openim.chat.chat.DelUserAccount:output_type -> openim.chat.DelUserAccountResp + 24, // 63: openim.chat.chat.FindUserAccount:output_type -> openim.chat.FindUserAccountResp + 26, // 64: openim.chat.chat.FindAccountUser:output_type -> openim.chat.FindAccountUserResp + 29, // 65: openim.chat.chat.OpenIMCallback:output_type -> openim.chat.OpenIMCallbackResp + 33, // 66: openim.chat.chat.UserLoginCount:output_type -> openim.chat.UserLoginCountResp + 36, // 67: openim.chat.chat.SearchUserInfo:output_type -> openim.chat.SearchUserInfoResp + 38, // 68: openim.chat.chat.GetTokenForVideoMeeting:output_type -> openim.chat.GetTokenForVideoMeetingResp + 49, // [49:69] is the sub-list for method output_type + 29, // [29:49] is the sub-list for method input_type + 29, // [29:29] is the sub-list for extension type_name + 29, // [29:29] is the sub-list for extension extendee + 0, // [0:29] is the sub-list for field type_name } func init() { file_chat_chat_proto_init() } @@ -3646,6 +3867,54 @@ func file_chat_chat_proto_init() { return nil } } + file_chat_chat_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CheckUserExistReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chat_chat_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CheckUserExistResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chat_chat_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DelUserAccountReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_chat_chat_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DelUserAccountResp); 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{ @@ -3653,7 +3922,7 @@ func file_chat_chat_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_chat_chat_proto_rawDesc, NumEnums: 0, - NumMessages: 42, + NumMessages: 46, NumExtensions: 0, NumServices: 1, }, @@ -3694,6 +3963,8 @@ type ChatClient interface { Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginResp, error) ResetPassword(ctx context.Context, in *ResetPasswordReq, opts ...grpc.CallOption) (*ResetPasswordResp, error) ChangePassword(ctx context.Context, in *ChangePasswordReq, opts ...grpc.CallOption) (*ChangePasswordResp, error) + CheckUserExist(ctx context.Context, in *CheckUserExistReq, opts ...grpc.CallOption) (*CheckUserExistResp, error) + DelUserAccount(ctx context.Context, in *DelUserAccountReq, opts ...grpc.CallOption) (*DelUserAccountResp, error) FindUserAccount(ctx context.Context, in *FindUserAccountReq, opts ...grpc.CallOption) (*FindUserAccountResp, error) FindAccountUser(ctx context.Context, in *FindAccountUserReq, opts ...grpc.CallOption) (*FindAccountUserResp, error) OpenIMCallback(ctx context.Context, in *OpenIMCallbackReq, opts ...grpc.CallOption) (*OpenIMCallbackResp, error) @@ -3820,6 +4091,24 @@ func (c *chatClient) ChangePassword(ctx context.Context, in *ChangePasswordReq, return out, nil } +func (c *chatClient) CheckUserExist(ctx context.Context, in *CheckUserExistReq, opts ...grpc.CallOption) (*CheckUserExistResp, error) { + out := new(CheckUserExistResp) + err := c.cc.Invoke(ctx, "/openim.chat.chat/CheckUserExist", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *chatClient) DelUserAccount(ctx context.Context, in *DelUserAccountReq, opts ...grpc.CallOption) (*DelUserAccountResp, error) { + out := new(DelUserAccountResp) + err := c.cc.Invoke(ctx, "/openim.chat.chat/DelUserAccount", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *chatClient) FindUserAccount(ctx context.Context, in *FindUserAccountReq, opts ...grpc.CallOption) (*FindUserAccountResp, error) { out := new(FindUserAccountResp) err := c.cc.Invoke(ctx, "/openim.chat.chat/FindUserAccount", in, out, opts...) @@ -3891,6 +4180,8 @@ type ChatServer interface { Login(context.Context, *LoginReq) (*LoginResp, error) ResetPassword(context.Context, *ResetPasswordReq) (*ResetPasswordResp, error) ChangePassword(context.Context, *ChangePasswordReq) (*ChangePasswordResp, error) + CheckUserExist(context.Context, *CheckUserExistReq) (*CheckUserExistResp, error) + DelUserAccount(context.Context, *DelUserAccountReq) (*DelUserAccountResp, error) FindUserAccount(context.Context, *FindUserAccountReq) (*FindUserAccountResp, error) FindAccountUser(context.Context, *FindAccountUserReq) (*FindAccountUserResp, error) OpenIMCallback(context.Context, *OpenIMCallbackReq) (*OpenIMCallbackResp, error) @@ -3941,6 +4232,12 @@ func (*UnimplementedChatServer) ResetPassword(context.Context, *ResetPasswordReq func (*UnimplementedChatServer) ChangePassword(context.Context, *ChangePasswordReq) (*ChangePasswordResp, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangePassword not implemented") } +func (*UnimplementedChatServer) CheckUserExist(context.Context, *CheckUserExistReq) (*CheckUserExistResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method CheckUserExist not implemented") +} +func (*UnimplementedChatServer) DelUserAccount(context.Context, *DelUserAccountReq) (*DelUserAccountResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method DelUserAccount not implemented") +} func (*UnimplementedChatServer) FindUserAccount(context.Context, *FindUserAccountReq) (*FindUserAccountResp, error) { return nil, status.Errorf(codes.Unimplemented, "method FindUserAccount not implemented") } @@ -4180,6 +4477,42 @@ func _Chat_ChangePassword_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _Chat_CheckUserExist_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CheckUserExistReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChatServer).CheckUserExist(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/openim.chat.chat/CheckUserExist", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChatServer).CheckUserExist(ctx, req.(*CheckUserExistReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _Chat_DelUserAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DelUserAccountReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ChatServer).DelUserAccount(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/openim.chat.chat/DelUserAccount", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ChatServer).DelUserAccount(ctx, req.(*DelUserAccountReq)) + } + return interceptor(ctx, in, info, handler) +} + func _Chat_FindUserAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(FindUserAccountReq) if err := dec(in); err != nil { @@ -4340,6 +4673,14 @@ var _Chat_serviceDesc = grpc.ServiceDesc{ MethodName: "ChangePassword", Handler: _Chat_ChangePassword_Handler, }, + { + MethodName: "CheckUserExist", + Handler: _Chat_CheckUserExist_Handler, + }, + { + MethodName: "DelUserAccount", + Handler: _Chat_DelUserAccount_Handler, + }, { MethodName: "FindUserAccount", Handler: _Chat_FindUserAccount_Handler, diff --git a/pkg/protocol/chat/chat.proto b/pkg/protocol/chat/chat.proto index a11c2cd4..c66bbd62 100644 --- a/pkg/protocol/chat/chat.proto +++ b/pkg/protocol/chat/chat.proto @@ -14,9 +14,11 @@ syntax = "proto3"; package openim.chat; -import "wrapperspb/wrapperspb.proto"; -import "sdkws/sdkws.proto"; + import "common/common.proto"; +import "sdkws/sdkws.proto"; +import "wrapperspb/wrapperspb.proto"; + option go_package = "github.com/openimsdk/chat/pkg/protocol/chat"; message UserIdentity { @@ -28,54 +30,53 @@ message UserIdentity { string account = 6; } - -message UpdateUserInfoReq{ - string userID = 1; - openim.protobuf.StringValue account = 2; - openim.protobuf.StringValue phoneNumber = 3; - openim.protobuf.StringValue areaCode = 4; - openim.protobuf.StringValue email = 5; - openim.protobuf.StringValue nickname = 6; - openim.protobuf.StringValue faceURL = 7; - openim.protobuf.Int32Value gender = 8; - openim.protobuf.Int32Value level = 9; +message UpdateUserInfoReq { + string userID = 1; + openim.protobuf.StringValue account = 2; + openim.protobuf.StringValue phoneNumber = 3; + openim.protobuf.StringValue areaCode = 4; + openim.protobuf.StringValue email = 5; + openim.protobuf.StringValue nickname = 6; + openim.protobuf.StringValue faceURL = 7; + openim.protobuf.Int32Value gender = 8; + openim.protobuf.Int32Value level = 9; openim.protobuf.Int64Value birth = 10; - openim.protobuf.Int32Value allowAddFriend = 11; - openim.protobuf.Int32Value allowBeep = 12; - openim.protobuf.Int32Value allowVibration = 13; - openim.protobuf.Int32Value globalRecvMsgOpt = 14; + openim.protobuf.Int32Value allowAddFriend = 11; + openim.protobuf.Int32Value allowBeep = 12; + openim.protobuf.Int32Value allowVibration = 13; + openim.protobuf.Int32Value globalRecvMsgOpt = 14; openim.protobuf.Int32Value RegisterType = 15; } -message UpdateUserInfoResp{ +message UpdateUserInfoResp { string faceUrl = 1; string nickName = 2; } -message FindUserPublicInfoReq{ - repeated string userIDs = 1; +message FindUserPublicInfoReq { + repeated string userIDs = 1; } -message FindUserPublicInfoResp{ +message FindUserPublicInfoResp { repeated openim.chat.common.UserPublicInfo users = 1; } -message SearchUserPublicInfoReq{ +message SearchUserPublicInfoReq { string keyword = 1; openim.sdkws.RequestPagination pagination = 2; int32 genders = 3; } -message SearchUserPublicInfoResp{ +message SearchUserPublicInfoResp { uint32 total = 1; repeated openim.chat.common.UserPublicInfo users = 2; } -message FindUserFullInfoReq{ +message FindUserFullInfoReq { repeated string userIDs = 1; } -message FindUserFullInfoResp{ +message FindUserFullInfoResp { repeated openim.chat.common.UserFullInfo users = 1; } @@ -90,8 +91,7 @@ message SendVerifyCodeReq { string email = 8; } -message SendVerifyCodeResp { -} +message SendVerifyCodeResp {} message VerifyCodeReq { string areaCode = 1; @@ -100,8 +100,7 @@ message VerifyCodeReq { string email = 4; } -message VerifyCodeResp { -} +message VerifyCodeResp {} message RegisterUserInfo { string userID = 1; @@ -132,15 +131,14 @@ message RegisterUserResp { string chatToken = 3; } -message AddUserAccountReq{ +message AddUserAccountReq { string ip = 1; string deviceID = 2; int32 platform = 3; RegisterUserInfo user = 4; } -message AddUserAccountResp{ -} +message AddUserAccountResp {} message LoginReq { string areaCode = 1; @@ -162,8 +160,7 @@ message ResetPasswordReq { string email = 5; } -message ResetPasswordResp { -} +message ResetPasswordResp {} message ChangePasswordReq { string userID = 1; @@ -171,14 +168,12 @@ message ChangePasswordReq { string newPassword = 3; } -message ChangePasswordResp { -} +message ChangePasswordResp {} message FindUserAccountReq { repeated string userIDs = 1; } - message FindUserAccountResp { map userAccountMap = 1; // userID account } @@ -213,28 +208,26 @@ message OpenIMCallbackReq { string body = 2; } -message OpenIMCallbackResp { - -} +message OpenIMCallbackResp {} -message SearchUserFullInfoReq{ +message SearchUserFullInfoReq { string keyword = 1; openim.sdkws.RequestPagination pagination = 2; int32 genders = 3; int32 normal = 4; } -message SearchUserFullInfoResp{ +message SearchUserFullInfoResp { uint32 total = 1; repeated openim.chat.common.UserFullInfo users = 2; } -message UserLoginCountReq{ +message UserLoginCountReq { int64 start = 1; int64 end = 2; } -message UserLoginCountResp{ +message UserLoginCountResp { int64 loginCount = 1; int64 unloginCount = 2; map count = 3; @@ -245,7 +238,7 @@ message LoginResp { string userID = 3; } -message SearchUserInfoReq{ +message SearchUserInfoReq { string keyword = 1; openim.sdkws.RequestPagination pagination = 2; repeated int32 genders = 3; @@ -267,34 +260,49 @@ message GetTokenForVideoMeetingResp { string token = 2; } +message CheckUserExistReq { + RegisterUserInfo user = 1; +} + +message CheckUserExistResp { + string userid = 1; + bool isRegistered = 2; +} + +message DelUserAccountReq { + repeated string userIDs = 1; +} +message DelUserAccountResp {} + service chat { // Edit personal information - called by the user or an administrator - rpc UpdateUserInfo(UpdateUserInfoReq) returns(UpdateUserInfoResp); - rpc AddUserAccount(AddUserAccountReq) returns(AddUserAccountResp); + rpc UpdateUserInfo(UpdateUserInfoReq) returns (UpdateUserInfoResp); + rpc AddUserAccount(AddUserAccountReq) returns (AddUserAccountResp); // Get user's public information - called by strangers - rpc SearchUserPublicInfo(SearchUserPublicInfoReq) returns(SearchUserPublicInfoResp); - rpc FindUserPublicInfo(FindUserPublicInfoReq) returns(FindUserPublicInfoResp); + rpc SearchUserPublicInfo(SearchUserPublicInfoReq) returns (SearchUserPublicInfoResp); + rpc FindUserPublicInfo(FindUserPublicInfoReq) returns (FindUserPublicInfoResp); // Search user information - called by administrators, other users get public fields - rpc SearchUserFullInfo(SearchUserFullInfoReq) returns(SearchUserFullInfoResp); - rpc FindUserFullInfo(FindUserFullInfoReq) returns(FindUserFullInfoResp); - - rpc SendVerifyCode(SendVerifyCodeReq) returns(SendVerifyCodeResp); - rpc VerifyCode(VerifyCodeReq) returns(VerifyCodeResp); - rpc RegisterUser(RegisterUserReq) returns(RegisterUserResp); - rpc Login(LoginReq) returns(LoginResp); - rpc ResetPassword(ResetPasswordReq) returns(ResetPasswordResp); - rpc ChangePassword(ChangePasswordReq) returns(ChangePasswordResp); - - rpc FindUserAccount(FindUserAccountReq) returns(FindUserAccountResp); - rpc FindAccountUser(FindAccountUserReq) returns(FindAccountUserResp); - - rpc OpenIMCallback(OpenIMCallbackReq) returns(OpenIMCallbackResp); + rpc SearchUserFullInfo(SearchUserFullInfoReq) returns (SearchUserFullInfoResp); + rpc FindUserFullInfo(FindUserFullInfoReq) returns (FindUserFullInfoResp); + + rpc SendVerifyCode(SendVerifyCodeReq) returns (SendVerifyCodeResp); + rpc VerifyCode(VerifyCodeReq) returns (VerifyCodeResp); + rpc RegisterUser(RegisterUserReq) returns (RegisterUserResp); + rpc Login(LoginReq) returns (LoginResp); + rpc ResetPassword(ResetPasswordReq) returns (ResetPasswordResp); + rpc ChangePassword(ChangePasswordReq) returns (ChangePasswordResp); + rpc CheckUserExist(CheckUserExistReq) returns (CheckUserExistResp); + rpc DelUserAccount(DelUserAccountReq) returns (DelUserAccountResp); + + rpc FindUserAccount(FindUserAccountReq) returns (FindUserAccountResp); + rpc FindAccountUser(FindAccountUserReq) returns (FindAccountUserResp); + rpc OpenIMCallback(OpenIMCallbackReq) returns (OpenIMCallbackResp); // Statistics rpc UserLoginCount(UserLoginCountReq) returns (UserLoginCountResp); - rpc SearchUserInfo(SearchUserInfoReq)returns(SearchUserInfoResp); + rpc SearchUserInfo(SearchUserInfoReq) returns (SearchUserInfoResp); // Audio/video call and video meeting rpc GetTokenForVideoMeeting(GetTokenForVideoMeetingReq) returns (GetTokenForVideoMeetingResp); -} \ No newline at end of file +} diff --git a/pkg/rpclient/chat/chat.go b/pkg/rpclient/chat/chat.go index d259693c..34a82ff2 100644 --- a/pkg/rpclient/chat/chat.go +++ b/pkg/rpclient/chat/chat.go @@ -103,3 +103,13 @@ func (o *ChatClient) UpdateUser(ctx context.Context, req *chat.UpdateUserInfoReq _, err := o.client.UpdateUserInfo(ctx, req) return err } + +func (o *ChatClient) CheckUserExist(ctx context.Context, req *chat.CheckUserExistReq) (resp *chat.CheckUserExistResp, err error) { + resp, err = o.client.CheckUserExist(ctx, req) + return resp, err +} + +func (o *ChatClient) DelUserAccount(ctx context.Context, req *chat.DelUserAccountReq) (resp *chat.DelUserAccountResp, err error) { + resp, err = o.client.DelUserAccount(ctx, req) + return resp, err +}