diff --git a/internal/logic/api/logic_ext.go b/internal/logic/api/logic_ext.go index 3ad4bf2..fb83516 100644 --- a/internal/logic/api/logic_ext.go +++ b/internal/logic/api/logic_ext.go @@ -10,6 +10,27 @@ import ( type LogicExtServer struct{} +// SetGroupBannedMembers 设置禁言 +func (s *LogicExtServer) SetGroupBannedMembers(ctx context.Context, in *pb.SetGroupMemberBannedReq) (*pb.SetGroupMemberBannedResp, error) { + userId, _, err := grpclib.GetCtxData(ctx) + if err != nil { + return nil, err + } + + var isAllMemberBanned = false + if in.IsAllMemberBanned == pb.AllMemberBannedType_YES_All_Member_Banned { + isAllMemberBanned = true + } + members, err := app.GroupApp.SetGroupMemberBanned(ctx, userId, in.GroupId, in.UserIds, isAllMemberBanned) + return &pb.SetGroupMemberBannedResp{Members: members, IsAllMemberBanned: in.IsAllMemberBanned}, err +} + +// GetGroupBannedMembers 获取群组禁言列表 +func (s *LogicExtServer) GetGroupBannedMembers(ctx context.Context, in *pb.GetGroupBannedMembersReq) (*pb.GetGroupBannedMembersResp, error) { + members, err := app.GroupApp.GetBannedMembers(ctx, in.GroupId) + return &pb.GetGroupBannedMembersResp{Members: members}, err +} + func (s *LogicExtServer) SendRedPacket(ctx context.Context, in *pb.SendRedPacketReq) (*pb.SendRedPacketResp, error) { userId, deviceId, err := grpclib.GetCtxData(ctx) if err != nil { @@ -224,7 +245,7 @@ func (*LogicExtServer) UpdateGroupMember(ctx context.Context, in *pb.UpdateGroup return &pb.Empty{}, app.GroupApp.UpdateMember(ctx, in) } -// DeleteGroupMember 添加群组成员 +// DeleteGroupMember 删除群组成员 func (*LogicExtServer) DeleteGroupMember(ctx context.Context, in *pb.DeleteGroupMemberReq) (*pb.Empty, error) { userId, _, err := grpclib.GetCtxData(ctx) if err != nil { diff --git a/internal/logic/app/group_app.go b/internal/logic/app/group_app.go index 505ba0c..0560653 100644 --- a/internal/logic/app/group_app.go +++ b/internal/logic/app/group_app.go @@ -2,8 +2,10 @@ package app import ( "context" + "errors" "gim/internal/logic/domain/group/model" "gim/internal/logic/domain/group/repo" + "gim/pkg/db" "gim/pkg/pb" ) @@ -149,6 +151,76 @@ func (*groupApp) SendMessage(ctx context.Context, sender *pb.Sender, req *pb.Sen return group.SendMessage(ctx, sender, req) } +// GetBannedMembers 获取群组禁言成员 +func (*groupApp) GetBannedMembers(ctx context.Context, groupId int64) ([]*pb.GroupMember, error) { + // 查询被禁言的成员列表 + group, err := repo.GroupRepo.GetForBanned(groupId) + if err != nil { + return nil, err + } + return group.GetMembers(ctx) +} + +// SetGroupMemberBanned 设置禁言 +func (*groupApp) SetGroupMemberBanned(ctx context.Context, optId, groupId int64, userIds []int64, isAllMemberBanned bool) ([]*pb.GroupMember, error) { + groupUser, err := repo.GroupUserRepo.Get(groupId, optId) + if err != nil { + return nil, err + } + if groupUser == nil { + return nil, errors.New("未查询到群组用户信息") + } + if groupUser.MemberType != int(pb.MemberType_GMT_ADMIN) { + return nil, errors.New("非管理员操作") + } + + group, err := repo.GroupRepo.Get(groupId) + if err != nil { + return nil, err + } + if isAllMemberBanned { + //设置全员禁言 + //1、更新 `group` 的 is_all_member_banned 状态 + group.IsAllMemberBanned = int32(pb.AllMemberBannedType_YES_All_Member_Banned) + err := repo.GroupRepo.Save(group) + if err != nil { + return nil, err + } + + //2、发送推送消息 + err = group.PushGroupMemberBanned(ctx, optId, 0, isAllMemberBanned) + if err != nil { + return nil, err + } + } else { + //设置成员禁言 + //1、更新 `group` 的 is_all_member_banned 状态 + group.IsAllMemberBanned = int32(pb.AllMemberBannedType_YES_All_Member_Banned) + err := repo.GroupRepo.Save(group) + if err != nil { + return nil, err + } + + //2、更新 `group_user` 的 status 状态 + db.DB.Model(model.GroupUser{}).Where("group_id = ?", groupId).Where("user_id IN ?", userIds).Updates(model.GroupUser{Status: int(pb.GroupUserStatusType_GROUP_USER_STATUS_Banned)}) + + //3、发送推送消息 + for _, u := range userIds { + err = group.PushGroupMemberBanned(ctx, optId, u, isAllMemberBanned) + if err != nil { + return nil, err + } + } + } + + // 查询被禁言的成员列表 + group, err = repo.GroupRepo.Get(groupId) + if err != nil { + return nil, err + } + return group.GetMembers(ctx) +} + // RecallSendMessage 撤回发送消息 func (*groupApp) RecallSendMessage(ctx context.Context, sender *pb.Sender, req *pb.RecallMessageReq) (int64, error) { group, err := repo.GroupRepo.Get(req.ReceiverId) diff --git a/internal/logic/domain/group/model/group.go b/internal/logic/domain/group/model/group.go index 440e52d..1484621 100644 --- a/internal/logic/domain/group/model/group.go +++ b/internal/logic/domain/group/model/group.go @@ -2,6 +2,7 @@ package model import ( "context" + "fmt" "gim/internal/logic/domain/message/repo" "gim/internal/logic/proxy" "gim/pkg/gerrors" @@ -23,15 +24,16 @@ const ( // Group 群组 type Group struct { - Id int64 // 群组id - Name string // 组名 - AvatarUrl string // 头像 - Introduction string // 群简介 - UserNum int32 // 群组人数 - Extra string // 附加字段 - CreateTime time.Time // 创建时间 - UpdateTime time.Time // 更新时间 - Members []GroupUser `gorm:"-"` // 群组成员 + Id int64 // 群组id + Name string // 组名 + AvatarUrl string // 头像 + Introduction string // 群简介 + UserNum int32 // 群组人数 + IsAllMemberBanned int32 // 是否全员禁言(1:是 2:否) + Extra string // 附加字段 + CreateTime time.Time // 创建时间 + UpdateTime time.Time // 更新时间 + Members []GroupUser `gorm:"-"` // 群组成员 } type GroupUser struct { @@ -449,3 +451,37 @@ func (g *Group) PushDeleteMember(ctx context.Context, optId, userId int64) error } return nil } + +func (g *Group) PushGroupMemberBanned(ctx context.Context, optId, userId int64, isAllMemberBanned bool) error { + userResp, err := rpc.GetBusinessIntClient().GetUser(ctx, &pb.GetUserReq{UserId: optId}) + if err != nil { + return err + } + if isAllMemberBanned { + bannedUserResp, err := rpc.GetBusinessIntClient().GetUser(ctx, &pb.GetUserReq{UserId: userId}) + if err != nil { + return err + } + err = g.PushMessage(ctx, pb.PushCode_PC_BANNED_GROUP_MEMBER, &pb.BannedGroupMemberPush{ + OptId: optId, + OptName: userResp.User.Nickname, + BannedUserId: userId, + BannedUserName: bannedUserResp.User.Nickname, + }, true) + if err != nil { + return err + } + return nil + } else { + err = g.PushMessage(ctx, pb.PushCode_PC_BANNED_GROUP_MEMBER, &pb.BannedGroupMemberPush{ + OptId: optId, + OptName: userResp.User.Nickname, + BannedUserId: userId, + BannedUserName: fmt.Sprintf("管理员\"%s\"设置了禁言", userResp.User.Nickname), + }, true) + if err != nil { + return err + } + return nil + } +} diff --git a/internal/logic/domain/group/repo/group_repo.go b/internal/logic/domain/group/repo/group_repo.go index 6433918..32b363e 100644 --- a/internal/logic/domain/group/repo/group_repo.go +++ b/internal/logic/domain/group/repo/group_repo.go @@ -35,6 +35,33 @@ func (*groupRepo) Get(groupId int64) (*model.Group, error) { return group, nil } +// GetForBanned 获取群组禁言用户信息 +func (*groupRepo) GetForBanned(groupId int64) (*model.Group, error) { + group, err := GroupCache.Get(groupId) + if err != nil { + return nil, err + } + if group != nil { + return group, nil + } + + group, err = GroupDao.Get(groupId) + if err != nil { + return nil, err + } + members, err := GroupUserRepo.ListBannedUser(groupId) + if err != nil { + return nil, err + } + group.Members = members + + err = GroupCache.Set(group) + if err != nil { + return nil, err + } + return group, nil +} + // Save 获取群组信息 func (*groupRepo) Save(group *model.Group) error { groupId := group.Id diff --git a/internal/logic/domain/group/repo/group_user_repo.go b/internal/logic/domain/group/repo/group_user_repo.go index 1d4a079..cd4817e 100644 --- a/internal/logic/domain/group/repo/group_user_repo.go +++ b/internal/logic/domain/group/repo/group_user_repo.go @@ -4,6 +4,7 @@ import ( "gim/internal/logic/domain/group/model" "gim/pkg/db" "gim/pkg/gerrors" + "gim/pkg/pb" "github.com/jinzhu/gorm" ) @@ -36,6 +37,16 @@ func (*groupUserRepo) ListUser(groupId int64) ([]model.GroupUser, error) { return groupUsers, nil } +// ListBannedUser 获取群组禁言用户信息 +func (*groupUserRepo) ListBannedUser(groupId int64) ([]model.GroupUser, error) { + var groupUsers []model.GroupUser + err := db.DB.Find(&groupUsers, "group_id = ? and status", groupId, pb.GroupUserStatusType_GROUP_USER_STATUS_Banned).Error + if err != nil { + return nil, gerrors.WrapError(err) + } + return groupUsers, nil +} + // Get 获取群组用户信息,用户不存在返回nil func (*groupUserRepo) Get(groupId, userId int64) (*model.GroupUser, error) { var groupUser model.GroupUser diff --git a/pkg/pb/connect.ext.pb.go b/pkg/pb/connect.ext.pb.go index 6c08a3f..b9a589f 100644 --- a/pkg/pb/connect.ext.pb.go +++ b/pkg/pb/connect.ext.pb.go @@ -467,6 +467,53 @@ func (MessageStatus) EnumDescriptor() ([]byte, []int) { return file_connect_ext_proto_rawDescGZIP(), []int{7} } +// 群组用户状态 +type GroupUserStatusType int32 + +const ( + GroupUserStatusType_GROUP_USER_STATUS_NORMAL GroupUserStatusType = 0 // 正常 + GroupUserStatusType_GROUP_USER_STATUS_Banned GroupUserStatusType = 1 // 禁言 +) + +// Enum value maps for GroupUserStatusType. +var ( + GroupUserStatusType_name = map[int32]string{ + 0: "GROUP_USER_STATUS_NORMAL", + 1: "GROUP_USER_STATUS_Banned", + } + GroupUserStatusType_value = map[string]int32{ + "GROUP_USER_STATUS_NORMAL": 0, + "GROUP_USER_STATUS_Banned": 1, + } +) + +func (x GroupUserStatusType) Enum() *GroupUserStatusType { + p := new(GroupUserStatusType) + *p = x + return p +} + +func (x GroupUserStatusType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GroupUserStatusType) Descriptor() protoreflect.EnumDescriptor { + return file_connect_ext_proto_enumTypes[8].Descriptor() +} + +func (GroupUserStatusType) Type() protoreflect.EnumType { + return &file_connect_ext_proto_enumTypes[8] +} + +func (x GroupUserStatusType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GroupUserStatusType.Descriptor instead. +func (GroupUserStatusType) EnumDescriptor() ([]byte, []int) { + return file_connect_ext_proto_rawDescGZIP(), []int{8} +} + // 单条消息投递内容(估算大约100个字节),todo 通知栏提醒 type Message struct { state protoimpl.MessageState @@ -2048,8 +2095,13 @@ var file_connect_ext_proto_rawDesc = []byte{ 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0e, 0x0a, 0x0a, 0x4d, 0x53, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4d, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4d, 0x53, 0x5f, 0x52, 0x45, 0x43, 0x41, 0x4c, - 0x4c, 0x10, 0x02, 0x42, 0x0d, 0x5a, 0x0b, 0x67, 0x69, 0x6d, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, - 0x62, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4c, 0x10, 0x02, 0x2a, 0x51, 0x0a, 0x13, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x55, 0x73, 0x65, 0x72, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x47, 0x52, + 0x4f, 0x55, 0x50, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, + 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18, 0x47, 0x52, 0x4f, 0x55, + 0x50, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x42, 0x61, + 0x6e, 0x6e, 0x65, 0x64, 0x10, 0x01, 0x42, 0x0d, 0x5a, 0x0b, 0x67, 0x69, 0x6d, 0x2f, 0x70, 0x6b, + 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2064,7 +2116,7 @@ func file_connect_ext_proto_rawDescGZIP() []byte { return file_connect_ext_proto_rawDescData } -var file_connect_ext_proto_enumTypes = make([]protoimpl.EnumInfo, 8) +var file_connect_ext_proto_enumTypes = make([]protoimpl.EnumInfo, 9) var file_connect_ext_proto_msgTypes = make([]protoimpl.MessageInfo, 20) var file_connect_ext_proto_goTypes = []interface{}{ (PackageType)(0), // 0: pb.PackageType @@ -2075,29 +2127,30 @@ var file_connect_ext_proto_goTypes = []interface{}{ (ReceiverType)(0), // 5: pb.ReceiverType (SenderType)(0), // 6: pb.SenderType (MessageStatus)(0), // 7: pb.MessageStatus - (*Message)(nil), // 8: pb.Message - (*Sender)(nil), // 9: pb.Sender - (*Text)(nil), // 10: pb.Text - (*Face)(nil), // 11: pb.Face - (*Voice)(nil), // 12: pb.Voice - (*Image)(nil), // 13: pb.Image - (*File)(nil), // 14: pb.File - (*Location)(nil), // 15: pb.Location - (*Command)(nil), // 16: pb.Command - (*Custom)(nil), // 17: pb.Custom - (*RECALL)(nil), // 18: pb.RECALL - (*RED_PACKAGE)(nil), // 19: pb.RED_PACKAGE - (*Input)(nil), // 20: pb.Input - (*Output)(nil), // 21: pb.Output - (*SignInInput)(nil), // 22: pb.SignInInput - (*SyncInput)(nil), // 23: pb.SyncInput - (*SyncOutput)(nil), // 24: pb.SyncOutput - (*SubscribeRoomInput)(nil), // 25: pb.SubscribeRoomInput - (*MessageSend)(nil), // 26: pb.MessageSend - (*MessageACK)(nil), // 27: pb.MessageACK + (GroupUserStatusType)(0), // 8: pb.GroupUserStatusType + (*Message)(nil), // 9: pb.Message + (*Sender)(nil), // 10: pb.Sender + (*Text)(nil), // 11: pb.Text + (*Face)(nil), // 12: pb.Face + (*Voice)(nil), // 13: pb.Voice + (*Image)(nil), // 14: pb.Image + (*File)(nil), // 15: pb.File + (*Location)(nil), // 16: pb.Location + (*Command)(nil), // 17: pb.Command + (*Custom)(nil), // 18: pb.Custom + (*RECALL)(nil), // 19: pb.RECALL + (*RED_PACKAGE)(nil), // 20: pb.RED_PACKAGE + (*Input)(nil), // 21: pb.Input + (*Output)(nil), // 22: pb.Output + (*SignInInput)(nil), // 23: pb.SignInInput + (*SyncInput)(nil), // 24: pb.SyncInput + (*SyncOutput)(nil), // 25: pb.SyncOutput + (*SubscribeRoomInput)(nil), // 26: pb.SubscribeRoomInput + (*MessageSend)(nil), // 27: pb.MessageSend + (*MessageACK)(nil), // 28: pb.MessageACK } var file_connect_ext_proto_depIdxs = []int32{ - 9, // 0: pb.Message.sender:type_name -> pb.Sender + 10, // 0: pb.Message.sender:type_name -> pb.Sender 5, // 1: pb.Message.receiver_type:type_name -> pb.ReceiverType 1, // 2: pb.Message.message_type:type_name -> pb.MessageType 7, // 3: pb.Message.status:type_name -> pb.MessageStatus @@ -2107,8 +2160,8 @@ var file_connect_ext_proto_depIdxs = []int32{ 4, // 7: pb.RED_PACKAGE.red_packet_status_type:type_name -> pb.RedPacketStatusType 0, // 8: pb.Input.type:type_name -> pb.PackageType 0, // 9: pb.Output.type:type_name -> pb.PackageType - 8, // 10: pb.SyncOutput.messages:type_name -> pb.Message - 8, // 11: pb.MessageSend.message:type_name -> pb.Message + 9, // 10: pb.SyncOutput.messages:type_name -> pb.Message + 9, // 11: pb.MessageSend.message:type_name -> pb.Message 12, // [12:12] is the sub-list for method output_type 12, // [12:12] is the sub-list for method input_type 12, // [12:12] is the sub-list for extension type_name @@ -2368,7 +2421,7 @@ func file_connect_ext_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_connect_ext_proto_rawDesc, - NumEnums: 8, + NumEnums: 9, NumMessages: 20, NumExtensions: 0, NumServices: 0, diff --git a/pkg/pb/logic.ext.pb.go b/pkg/pb/logic.ext.pb.go index 70a6ec6..84f2ce7 100644 --- a/pkg/pb/logic.ext.pb.go +++ b/pkg/pb/logic.ext.pb.go @@ -73,6 +73,55 @@ func (MemberType) EnumDescriptor() ([]byte, []int) { return file_logic_ext_proto_rawDescGZIP(), []int{0} } +type AllMemberBannedType int32 + +const ( + AllMemberBannedType_UNKNOWN_All_Member_Banned AllMemberBannedType = 0 // 未知 + AllMemberBannedType_YES_All_Member_Banned AllMemberBannedType = 1 // 是-全员禁言 + AllMemberBannedType_NOT_All_Member_Banned AllMemberBannedType = 2 // 否-全员禁言 +) + +// Enum value maps for AllMemberBannedType. +var ( + AllMemberBannedType_name = map[int32]string{ + 0: "UNKNOWN_All_Member_Banned", + 1: "YES_All_Member_Banned", + 2: "NOT_All_Member_Banned", + } + AllMemberBannedType_value = map[string]int32{ + "UNKNOWN_All_Member_Banned": 0, + "YES_All_Member_Banned": 1, + "NOT_All_Member_Banned": 2, + } +) + +func (x AllMemberBannedType) Enum() *AllMemberBannedType { + p := new(AllMemberBannedType) + *p = x + return p +} + +func (x AllMemberBannedType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AllMemberBannedType) Descriptor() protoreflect.EnumDescriptor { + return file_logic_ext_proto_enumTypes[1].Descriptor() +} + +func (AllMemberBannedType) Type() protoreflect.EnumType { + return &file_logic_ext_proto_enumTypes[1] +} + +func (x AllMemberBannedType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AllMemberBannedType.Descriptor instead. +func (AllMemberBannedType) EnumDescriptor() ([]byte, []int) { + return file_logic_ext_proto_rawDescGZIP(), []int{1} +} + type RegisterDeviceReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2051,6 +2100,218 @@ func (x *GroupMember) GetExtra() string { return "" } +type SetGroupMemberBannedReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GroupId int64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` // 群组id + UserIds []int64 `protobuf:"varint,2,rep,packed,name=user_ids,json=userIds,proto3" json:"user_ids,omitempty"` // 用户id列表 + IsAllMemberBanned AllMemberBannedType `protobuf:"varint,3,opt,name=is_all_member_banned,json=isAllMemberBanned,proto3,enum=pb.AllMemberBannedType" json:"is_all_member_banned,omitempty"` // 全员禁言(1:是 2:否) +} + +func (x *SetGroupMemberBannedReq) Reset() { + *x = SetGroupMemberBannedReq{} + if protoimpl.UnsafeEnabled { + mi := &file_logic_ext_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetGroupMemberBannedReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetGroupMemberBannedReq) ProtoMessage() {} + +func (x *SetGroupMemberBannedReq) ProtoReflect() protoreflect.Message { + mi := &file_logic_ext_proto_msgTypes[30] + 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 SetGroupMemberBannedReq.ProtoReflect.Descriptor instead. +func (*SetGroupMemberBannedReq) Descriptor() ([]byte, []int) { + return file_logic_ext_proto_rawDescGZIP(), []int{30} +} + +func (x *SetGroupMemberBannedReq) GetGroupId() int64 { + if x != nil { + return x.GroupId + } + return 0 +} + +func (x *SetGroupMemberBannedReq) GetUserIds() []int64 { + if x != nil { + return x.UserIds + } + return nil +} + +func (x *SetGroupMemberBannedReq) GetIsAllMemberBanned() AllMemberBannedType { + if x != nil { + return x.IsAllMemberBanned + } + return AllMemberBannedType_UNKNOWN_All_Member_Banned +} + +type SetGroupMemberBannedResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IsAllMemberBanned AllMemberBannedType `protobuf:"varint,3,opt,name=is_all_member_banned,json=isAllMemberBanned,proto3,enum=pb.AllMemberBannedType" json:"is_all_member_banned,omitempty"` // 全员禁言(1:是 2:否) + Members []*GroupMember `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"` //禁言人员列表 +} + +func (x *SetGroupMemberBannedResp) Reset() { + *x = SetGroupMemberBannedResp{} + if protoimpl.UnsafeEnabled { + mi := &file_logic_ext_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetGroupMemberBannedResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetGroupMemberBannedResp) ProtoMessage() {} + +func (x *SetGroupMemberBannedResp) ProtoReflect() protoreflect.Message { + mi := &file_logic_ext_proto_msgTypes[31] + 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 SetGroupMemberBannedResp.ProtoReflect.Descriptor instead. +func (*SetGroupMemberBannedResp) Descriptor() ([]byte, []int) { + return file_logic_ext_proto_rawDescGZIP(), []int{31} +} + +func (x *SetGroupMemberBannedResp) GetIsAllMemberBanned() AllMemberBannedType { + if x != nil { + return x.IsAllMemberBanned + } + return AllMemberBannedType_UNKNOWN_All_Member_Banned +} + +func (x *SetGroupMemberBannedResp) GetMembers() []*GroupMember { + if x != nil { + return x.Members + } + return nil +} + +type GetGroupBannedMembersReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GroupId int64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` +} + +func (x *GetGroupBannedMembersReq) Reset() { + *x = GetGroupBannedMembersReq{} + if protoimpl.UnsafeEnabled { + mi := &file_logic_ext_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetGroupBannedMembersReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGroupBannedMembersReq) ProtoMessage() {} + +func (x *GetGroupBannedMembersReq) ProtoReflect() protoreflect.Message { + mi := &file_logic_ext_proto_msgTypes[32] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetGroupBannedMembersReq.ProtoReflect.Descriptor instead. +func (*GetGroupBannedMembersReq) Descriptor() ([]byte, []int) { + return file_logic_ext_proto_rawDescGZIP(), []int{32} +} + +func (x *GetGroupBannedMembersReq) GetGroupId() int64 { + if x != nil { + return x.GroupId + } + return 0 +} + +type GetGroupBannedMembersResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Members []*GroupMember `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"` +} + +func (x *GetGroupBannedMembersResp) Reset() { + *x = GetGroupBannedMembersResp{} + if protoimpl.UnsafeEnabled { + mi := &file_logic_ext_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetGroupBannedMembersResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetGroupBannedMembersResp) ProtoMessage() {} + +func (x *GetGroupBannedMembersResp) ProtoReflect() protoreflect.Message { + mi := &file_logic_ext_proto_msgTypes[33] + 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 GetGroupBannedMembersResp.ProtoReflect.Descriptor instead. +func (*GetGroupBannedMembersResp) Descriptor() ([]byte, []int) { + return file_logic_ext_proto_rawDescGZIP(), []int{33} +} + +func (x *GetGroupBannedMembersResp) GetMembers() []*GroupMember { + if x != nil { + return x.Members + } + return nil +} + var File_logic_ext_proto protoreflect.FileDescriptor var file_logic_ext_proto_rawDesc = []byte{ @@ -2290,73 +2551,117 @@ var file_logic_ext_proto_rawDesc = []byte{ 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x78, 0x74, 0x72, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x78, 0x74, - 0x72, 0x61, 0x2a, 0x3c, 0x0a, 0x0a, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x0f, 0x0a, 0x0b, 0x47, 0x4d, 0x54, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, - 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x47, 0x4d, 0x54, 0x5f, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x10, 0x01, - 0x12, 0x0e, 0x0a, 0x0a, 0x47, 0x4d, 0x54, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, - 0x32, 0xd0, 0x07, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x45, 0x78, 0x74, 0x12, 0x3f, 0x0a, - 0x0e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, - 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x44, 0x65, 0x76, - 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x36, - 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x2e, - 0x70, 0x62, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, - 0x71, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3c, 0x0a, 0x0d, 0x52, 0x65, 0x63, 0x61, 0x6c, 0x6c, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x63, - 0x61, 0x6c, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, - 0x70, 0x62, 0x2e, 0x52, 0x65, 0x63, 0x61, 0x6c, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x12, 0x26, 0x0a, 0x08, 0x50, 0x75, 0x73, 0x68, 0x52, 0x6f, 0x6f, 0x6d, - 0x12, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, - 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3c, 0x0a, 0x0d, - 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x14, 0x2e, - 0x70, 0x62, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x64, - 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x09, 0x41, 0x64, - 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x64, 0x64, - 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x12, 0x32, 0x0a, 0x0e, 0x41, 0x67, 0x72, 0x65, 0x65, 0x41, 0x64, 0x64, - 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x67, 0x72, 0x65, - 0x65, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, - 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x2e, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, - 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x30, 0x0a, 0x09, 0x53, 0x65, 0x74, 0x46, - 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x74, 0x46, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x74, - 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2b, 0x0a, 0x0a, 0x47, 0x65, - 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x12, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x1a, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x72, 0x69, 0x65, - 0x6e, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x36, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x2c, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x12, - 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x2d, 0x0a, - 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x47, - 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, - 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x29, 0x0a, 0x09, - 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x42, 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, - 0x41, 0x64, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x64, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x38, 0x0a, 0x11, 0x55, + 0x72, 0x61, 0x22, 0x99, 0x01, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x52, 0x65, 0x71, 0x12, 0x19, + 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x03, 0x52, 0x07, 0x75, 0x73, 0x65, + 0x72, 0x49, 0x64, 0x73, 0x12, 0x48, 0x0a, 0x14, 0x69, 0x73, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x6d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x62, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x6c, 0x6c, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x42, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x11, 0x69, 0x73, 0x41, + 0x6c, 0x6c, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x22, 0x8f, + 0x01, 0x0a, 0x18, 0x53, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x42, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x48, 0x0a, 0x14, 0x69, + 0x73, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x62, 0x61, 0x6e, + 0x6e, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x41, + 0x6c, 0x6c, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x11, 0x69, 0x73, 0x41, 0x6c, 0x6c, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x42, + 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x12, 0x29, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, + 0x22, 0x35, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x61, 0x6e, 0x6e, + 0x65, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x12, 0x19, 0x0a, 0x08, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x22, 0x46, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x42, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x29, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2a, + 0x3c, 0x0a, 0x0a, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, + 0x0b, 0x47, 0x4d, 0x54, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0d, + 0x0a, 0x09, 0x47, 0x4d, 0x54, 0x5f, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x0e, 0x0a, + 0x0a, 0x47, 0x4d, 0x54, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x2a, 0x6a, 0x0a, + 0x13, 0x41, 0x6c, 0x6c, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x61, 0x6e, 0x6e, 0x65, 0x64, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, + 0x41, 0x6c, 0x6c, 0x5f, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x42, 0x61, 0x6e, 0x6e, 0x65, + 0x64, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x59, 0x45, 0x53, 0x5f, 0x41, 0x6c, 0x6c, 0x5f, 0x4d, + 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x42, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x10, 0x01, 0x12, 0x19, + 0x0a, 0x15, 0x4e, 0x4f, 0x54, 0x5f, 0x41, 0x6c, 0x6c, 0x5f, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, + 0x5f, 0x42, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x10, 0x02, 0x32, 0xfa, 0x08, 0x0a, 0x08, 0x4c, 0x6f, + 0x67, 0x69, 0x63, 0x45, 0x78, 0x74, 0x12, 0x3f, 0x0a, 0x0e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x1a, + 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x44, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x36, 0x0a, 0x0b, 0x53, 0x65, 0x6e, 0x64, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x6e, 0x64, + 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, + 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x3c, 0x0a, 0x0d, 0x52, 0x65, 0x63, 0x61, 0x6c, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x12, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x63, 0x61, 0x6c, 0x6c, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x63, 0x61, + 0x6c, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x26, 0x0a, + 0x08, 0x50, 0x75, 0x73, 0x68, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x50, + 0x75, 0x73, 0x68, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3c, 0x0a, 0x0d, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x64, + 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x6e, 0x64, + 0x52, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x70, + 0x62, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x28, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x12, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, + 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x32, 0x0a, + 0x0e, 0x41, 0x67, 0x72, 0x65, 0x65, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, + 0x15, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x67, 0x72, 0x65, 0x65, 0x41, 0x64, 0x64, 0x46, 0x72, 0x69, + 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x12, 0x2e, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, 0x72, 0x69, 0x65, 0x6e, + 0x64, 0x12, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x46, 0x72, 0x69, + 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x12, 0x30, 0x0a, 0x09, 0x53, 0x65, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x12, 0x10, + 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, + 0x1a, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x2b, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, + 0x73, 0x12, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x12, 0x2e, 0x70, + 0x62, 0x2e, 0x47, 0x65, 0x74, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x36, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, + 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2c, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x2d, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, + 0x75, 0x70, 0x12, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x52, 0x65, 0x73, 0x70, 0x12, 0x29, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x73, 0x12, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x11, 0x2e, + 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x42, 0x0a, 0x0f, 0x41, 0x64, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x41, 0x64, 0x64, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x70, 0x62, + 0x2e, 0x41, 0x64, 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x38, 0x0a, 0x11, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, - 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x38, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, - 0x42, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x73, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x70, 0x62, 0x2e, - 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x42, 0x0d, 0x5a, 0x0b, 0x67, 0x69, 0x6d, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, - 0x62, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x38, + 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x1a, 0x09, 0x2e, + 0x70, 0x62, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x42, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x16, 0x2e, 0x70, 0x62, + 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, + 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x52, 0x0a, 0x15, + 0x53, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x4d, 0x65, + 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x74, 0x47, 0x72, + 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x52, + 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x12, 0x54, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x61, 0x6e, 0x6e, + 0x65, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x47, + 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x4d, 0x65, 0x6d, + 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x42, 0x0d, 0x5a, 0x0b, 0x67, 0x69, 0x6d, 0x2f, 0x70, 0x6b, + 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2371,99 +2676,112 @@ func file_logic_ext_proto_rawDescGZIP() []byte { return file_logic_ext_proto_rawDescData } -var file_logic_ext_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_logic_ext_proto_msgTypes = make([]protoimpl.MessageInfo, 30) +var file_logic_ext_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_logic_ext_proto_msgTypes = make([]protoimpl.MessageInfo, 34) var file_logic_ext_proto_goTypes = []interface{}{ - (MemberType)(0), // 0: pb.MemberType - (*RegisterDeviceReq)(nil), // 1: pb.RegisterDeviceReq - (*RegisterDeviceResp)(nil), // 2: pb.RegisterDeviceResp - (*SendMessageReq)(nil), // 3: pb.SendMessageReq - (*SendMessageResp)(nil), // 4: pb.SendMessageResp - (*RecallMessageReq)(nil), // 5: pb.RecallMessageReq - (*RecallMessageResp)(nil), // 6: pb.RecallMessageResp - (*SendRedPacketReq)(nil), // 7: pb.SendRedPacketReq - (*SendRedPacketResp)(nil), // 8: pb.SendRedPacketResp - (*PushRoomReq)(nil), // 9: pb.PushRoomReq - (*AddFriendReq)(nil), // 10: pb.AddFriendReq - (*DeleteFriendReq)(nil), // 11: pb.DeleteFriendReq - (*AgreeAddFriendReq)(nil), // 12: pb.AgreeAddFriendReq - (*SetFriendReq)(nil), // 13: pb.SetFriendReq - (*SetFriendResp)(nil), // 14: pb.SetFriendResp - (*Friend)(nil), // 15: pb.Friend - (*GetFriendsResp)(nil), // 16: pb.GetFriendsResp - (*CreateGroupReq)(nil), // 17: pb.CreateGroupReq - (*CreateGroupResp)(nil), // 18: pb.CreateGroupResp - (*UpdateGroupReq)(nil), // 19: pb.UpdateGroupReq - (*GetGroupReq)(nil), // 20: pb.GetGroupReq - (*GetGroupResp)(nil), // 21: pb.GetGroupResp - (*Group)(nil), // 22: pb.Group - (*GetGroupsResp)(nil), // 23: pb.GetGroupsResp - (*AddGroupMembersReq)(nil), // 24: pb.AddGroupMembersReq - (*AddGroupMembersResp)(nil), // 25: pb.AddGroupMembersResp - (*UpdateGroupMemberReq)(nil), // 26: pb.UpdateGroupMemberReq - (*DeleteGroupMemberReq)(nil), // 27: pb.DeleteGroupMemberReq - (*GetGroupMembersReq)(nil), // 28: pb.GetGroupMembersReq - (*GetGroupMembersResp)(nil), // 29: pb.GetGroupMembersResp - (*GroupMember)(nil), // 30: pb.GroupMember - (ReceiverType)(0), // 31: pb.ReceiverType - (MessageType)(0), // 32: pb.MessageType - (*Empty)(nil), // 33: pb.Empty + (MemberType)(0), // 0: pb.MemberType + (AllMemberBannedType)(0), // 1: pb.AllMemberBannedType + (*RegisterDeviceReq)(nil), // 2: pb.RegisterDeviceReq + (*RegisterDeviceResp)(nil), // 3: pb.RegisterDeviceResp + (*SendMessageReq)(nil), // 4: pb.SendMessageReq + (*SendMessageResp)(nil), // 5: pb.SendMessageResp + (*RecallMessageReq)(nil), // 6: pb.RecallMessageReq + (*RecallMessageResp)(nil), // 7: pb.RecallMessageResp + (*SendRedPacketReq)(nil), // 8: pb.SendRedPacketReq + (*SendRedPacketResp)(nil), // 9: pb.SendRedPacketResp + (*PushRoomReq)(nil), // 10: pb.PushRoomReq + (*AddFriendReq)(nil), // 11: pb.AddFriendReq + (*DeleteFriendReq)(nil), // 12: pb.DeleteFriendReq + (*AgreeAddFriendReq)(nil), // 13: pb.AgreeAddFriendReq + (*SetFriendReq)(nil), // 14: pb.SetFriendReq + (*SetFriendResp)(nil), // 15: pb.SetFriendResp + (*Friend)(nil), // 16: pb.Friend + (*GetFriendsResp)(nil), // 17: pb.GetFriendsResp + (*CreateGroupReq)(nil), // 18: pb.CreateGroupReq + (*CreateGroupResp)(nil), // 19: pb.CreateGroupResp + (*UpdateGroupReq)(nil), // 20: pb.UpdateGroupReq + (*GetGroupReq)(nil), // 21: pb.GetGroupReq + (*GetGroupResp)(nil), // 22: pb.GetGroupResp + (*Group)(nil), // 23: pb.Group + (*GetGroupsResp)(nil), // 24: pb.GetGroupsResp + (*AddGroupMembersReq)(nil), // 25: pb.AddGroupMembersReq + (*AddGroupMembersResp)(nil), // 26: pb.AddGroupMembersResp + (*UpdateGroupMemberReq)(nil), // 27: pb.UpdateGroupMemberReq + (*DeleteGroupMemberReq)(nil), // 28: pb.DeleteGroupMemberReq + (*GetGroupMembersReq)(nil), // 29: pb.GetGroupMembersReq + (*GetGroupMembersResp)(nil), // 30: pb.GetGroupMembersResp + (*GroupMember)(nil), // 31: pb.GroupMember + (*SetGroupMemberBannedReq)(nil), // 32: pb.SetGroupMemberBannedReq + (*SetGroupMemberBannedResp)(nil), // 33: pb.SetGroupMemberBannedResp + (*GetGroupBannedMembersReq)(nil), // 34: pb.GetGroupBannedMembersReq + (*GetGroupBannedMembersResp)(nil), // 35: pb.GetGroupBannedMembersResp + (ReceiverType)(0), // 36: pb.ReceiverType + (MessageType)(0), // 37: pb.MessageType + (*Empty)(nil), // 38: pb.Empty } var file_logic_ext_proto_depIdxs = []int32{ - 31, // 0: pb.SendMessageReq.receiver_type:type_name -> pb.ReceiverType - 32, // 1: pb.SendMessageReq.message_type:type_name -> pb.MessageType - 31, // 2: pb.RecallMessageReq.receiver_type:type_name -> pb.ReceiverType - 32, // 3: pb.RecallMessageReq.message_type:type_name -> pb.MessageType - 31, // 4: pb.SendRedPacketReq.receiver_type:type_name -> pb.ReceiverType - 32, // 5: pb.SendRedPacketReq.message_type:type_name -> pb.MessageType - 32, // 6: pb.PushRoomReq.message_type:type_name -> pb.MessageType - 15, // 7: pb.GetFriendsResp.friends:type_name -> pb.Friend - 22, // 8: pb.GetGroupResp.group:type_name -> pb.Group - 22, // 9: pb.GetGroupsResp.groups:type_name -> pb.Group + 36, // 0: pb.SendMessageReq.receiver_type:type_name -> pb.ReceiverType + 37, // 1: pb.SendMessageReq.message_type:type_name -> pb.MessageType + 36, // 2: pb.RecallMessageReq.receiver_type:type_name -> pb.ReceiverType + 37, // 3: pb.RecallMessageReq.message_type:type_name -> pb.MessageType + 36, // 4: pb.SendRedPacketReq.receiver_type:type_name -> pb.ReceiverType + 37, // 5: pb.SendRedPacketReq.message_type:type_name -> pb.MessageType + 37, // 6: pb.PushRoomReq.message_type:type_name -> pb.MessageType + 16, // 7: pb.GetFriendsResp.friends:type_name -> pb.Friend + 23, // 8: pb.GetGroupResp.group:type_name -> pb.Group + 23, // 9: pb.GetGroupsResp.groups:type_name -> pb.Group 0, // 10: pb.UpdateGroupMemberReq.member_type:type_name -> pb.MemberType - 30, // 11: pb.GetGroupMembersResp.members:type_name -> pb.GroupMember + 31, // 11: pb.GetGroupMembersResp.members:type_name -> pb.GroupMember 0, // 12: pb.GroupMember.member_type:type_name -> pb.MemberType - 1, // 13: pb.LogicExt.RegisterDevice:input_type -> pb.RegisterDeviceReq - 3, // 14: pb.LogicExt.SendMessage:input_type -> pb.SendMessageReq - 5, // 15: pb.LogicExt.RecallMessage:input_type -> pb.RecallMessageReq - 9, // 16: pb.LogicExt.PushRoom:input_type -> pb.PushRoomReq - 7, // 17: pb.LogicExt.SendRedPacket:input_type -> pb.SendRedPacketReq - 10, // 18: pb.LogicExt.AddFriend:input_type -> pb.AddFriendReq - 12, // 19: pb.LogicExt.AgreeAddFriend:input_type -> pb.AgreeAddFriendReq - 11, // 20: pb.LogicExt.DeleteFriend:input_type -> pb.DeleteFriendReq - 13, // 21: pb.LogicExt.SetFriend:input_type -> pb.SetFriendReq - 33, // 22: pb.LogicExt.GetFriends:input_type -> pb.Empty - 17, // 23: pb.LogicExt.CreateGroup:input_type -> pb.CreateGroupReq - 19, // 24: pb.LogicExt.UpdateGroup:input_type -> pb.UpdateGroupReq - 20, // 25: pb.LogicExt.GetGroup:input_type -> pb.GetGroupReq - 33, // 26: pb.LogicExt.GetGroups:input_type -> pb.Empty - 24, // 27: pb.LogicExt.AddGroupMembers:input_type -> pb.AddGroupMembersReq - 26, // 28: pb.LogicExt.UpdateGroupMember:input_type -> pb.UpdateGroupMemberReq - 27, // 29: pb.LogicExt.DeleteGroupMember:input_type -> pb.DeleteGroupMemberReq - 28, // 30: pb.LogicExt.GetGroupMembers:input_type -> pb.GetGroupMembersReq - 2, // 31: pb.LogicExt.RegisterDevice:output_type -> pb.RegisterDeviceResp - 4, // 32: pb.LogicExt.SendMessage:output_type -> pb.SendMessageResp - 6, // 33: pb.LogicExt.RecallMessage:output_type -> pb.RecallMessageResp - 33, // 34: pb.LogicExt.PushRoom:output_type -> pb.Empty - 8, // 35: pb.LogicExt.SendRedPacket:output_type -> pb.SendRedPacketResp - 33, // 36: pb.LogicExt.AddFriend:output_type -> pb.Empty - 33, // 37: pb.LogicExt.AgreeAddFriend:output_type -> pb.Empty - 33, // 38: pb.LogicExt.DeleteFriend:output_type -> pb.Empty - 14, // 39: pb.LogicExt.SetFriend:output_type -> pb.SetFriendResp - 16, // 40: pb.LogicExt.GetFriends:output_type -> pb.GetFriendsResp - 18, // 41: pb.LogicExt.CreateGroup:output_type -> pb.CreateGroupResp - 33, // 42: pb.LogicExt.UpdateGroup:output_type -> pb.Empty - 21, // 43: pb.LogicExt.GetGroup:output_type -> pb.GetGroupResp - 23, // 44: pb.LogicExt.GetGroups:output_type -> pb.GetGroupsResp - 25, // 45: pb.LogicExt.AddGroupMembers:output_type -> pb.AddGroupMembersResp - 33, // 46: pb.LogicExt.UpdateGroupMember:output_type -> pb.Empty - 33, // 47: pb.LogicExt.DeleteGroupMember:output_type -> pb.Empty - 29, // 48: pb.LogicExt.GetGroupMembers:output_type -> pb.GetGroupMembersResp - 31, // [31:49] is the sub-list for method output_type - 13, // [13:31] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name + 1, // 13: pb.SetGroupMemberBannedReq.is_all_member_banned:type_name -> pb.AllMemberBannedType + 1, // 14: pb.SetGroupMemberBannedResp.is_all_member_banned:type_name -> pb.AllMemberBannedType + 31, // 15: pb.SetGroupMemberBannedResp.members:type_name -> pb.GroupMember + 31, // 16: pb.GetGroupBannedMembersResp.members:type_name -> pb.GroupMember + 2, // 17: pb.LogicExt.RegisterDevice:input_type -> pb.RegisterDeviceReq + 4, // 18: pb.LogicExt.SendMessage:input_type -> pb.SendMessageReq + 6, // 19: pb.LogicExt.RecallMessage:input_type -> pb.RecallMessageReq + 10, // 20: pb.LogicExt.PushRoom:input_type -> pb.PushRoomReq + 8, // 21: pb.LogicExt.SendRedPacket:input_type -> pb.SendRedPacketReq + 11, // 22: pb.LogicExt.AddFriend:input_type -> pb.AddFriendReq + 13, // 23: pb.LogicExt.AgreeAddFriend:input_type -> pb.AgreeAddFriendReq + 12, // 24: pb.LogicExt.DeleteFriend:input_type -> pb.DeleteFriendReq + 14, // 25: pb.LogicExt.SetFriend:input_type -> pb.SetFriendReq + 38, // 26: pb.LogicExt.GetFriends:input_type -> pb.Empty + 18, // 27: pb.LogicExt.CreateGroup:input_type -> pb.CreateGroupReq + 20, // 28: pb.LogicExt.UpdateGroup:input_type -> pb.UpdateGroupReq + 21, // 29: pb.LogicExt.GetGroup:input_type -> pb.GetGroupReq + 38, // 30: pb.LogicExt.GetGroups:input_type -> pb.Empty + 25, // 31: pb.LogicExt.AddGroupMembers:input_type -> pb.AddGroupMembersReq + 27, // 32: pb.LogicExt.UpdateGroupMember:input_type -> pb.UpdateGroupMemberReq + 28, // 33: pb.LogicExt.DeleteGroupMember:input_type -> pb.DeleteGroupMemberReq + 29, // 34: pb.LogicExt.GetGroupMembers:input_type -> pb.GetGroupMembersReq + 32, // 35: pb.LogicExt.SetGroupBannedMembers:input_type -> pb.SetGroupMemberBannedReq + 34, // 36: pb.LogicExt.GetGroupBannedMembers:input_type -> pb.GetGroupBannedMembersReq + 3, // 37: pb.LogicExt.RegisterDevice:output_type -> pb.RegisterDeviceResp + 5, // 38: pb.LogicExt.SendMessage:output_type -> pb.SendMessageResp + 7, // 39: pb.LogicExt.RecallMessage:output_type -> pb.RecallMessageResp + 38, // 40: pb.LogicExt.PushRoom:output_type -> pb.Empty + 9, // 41: pb.LogicExt.SendRedPacket:output_type -> pb.SendRedPacketResp + 38, // 42: pb.LogicExt.AddFriend:output_type -> pb.Empty + 38, // 43: pb.LogicExt.AgreeAddFriend:output_type -> pb.Empty + 38, // 44: pb.LogicExt.DeleteFriend:output_type -> pb.Empty + 15, // 45: pb.LogicExt.SetFriend:output_type -> pb.SetFriendResp + 17, // 46: pb.LogicExt.GetFriends:output_type -> pb.GetFriendsResp + 19, // 47: pb.LogicExt.CreateGroup:output_type -> pb.CreateGroupResp + 38, // 48: pb.LogicExt.UpdateGroup:output_type -> pb.Empty + 22, // 49: pb.LogicExt.GetGroup:output_type -> pb.GetGroupResp + 24, // 50: pb.LogicExt.GetGroups:output_type -> pb.GetGroupsResp + 26, // 51: pb.LogicExt.AddGroupMembers:output_type -> pb.AddGroupMembersResp + 38, // 52: pb.LogicExt.UpdateGroupMember:output_type -> pb.Empty + 38, // 53: pb.LogicExt.DeleteGroupMember:output_type -> pb.Empty + 30, // 54: pb.LogicExt.GetGroupMembers:output_type -> pb.GetGroupMembersResp + 33, // 55: pb.LogicExt.SetGroupBannedMembers:output_type -> pb.SetGroupMemberBannedResp + 35, // 56: pb.LogicExt.GetGroupBannedMembers:output_type -> pb.GetGroupBannedMembersResp + 37, // [37:57] is the sub-list for method output_type + 17, // [17:37] is the sub-list for method input_type + 17, // [17:17] is the sub-list for extension type_name + 17, // [17:17] is the sub-list for extension extendee + 0, // [0:17] is the sub-list for field type_name } func init() { file_logic_ext_proto_init() } @@ -2834,14 +3152,62 @@ func file_logic_ext_proto_init() { return nil } } + file_logic_ext_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetGroupMemberBannedReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_logic_ext_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetGroupMemberBannedResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_logic_ext_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetGroupBannedMembersReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_logic_ext_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetGroupBannedMembersResp); 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{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_logic_ext_proto_rawDesc, - NumEnums: 1, - NumMessages: 30, + NumEnums: 2, + NumMessages: 34, NumExtensions: 0, NumServices: 1, }, @@ -2897,10 +3263,14 @@ type LogicExtClient interface { AddGroupMembers(ctx context.Context, in *AddGroupMembersReq, opts ...grpc.CallOption) (*AddGroupMembersResp, error) // 更新群组成员信息 UpdateGroupMember(ctx context.Context, in *UpdateGroupMemberReq, opts ...grpc.CallOption) (*Empty, error) - // 添加群组成员 + // 删除群组成员 DeleteGroupMember(ctx context.Context, in *DeleteGroupMemberReq, opts ...grpc.CallOption) (*Empty, error) // 获取群组成员 GetGroupMembers(ctx context.Context, in *GetGroupMembersReq, opts ...grpc.CallOption) (*GetGroupMembersResp, error) + // 设置禁言 + SetGroupBannedMembers(ctx context.Context, in *SetGroupMemberBannedReq, opts ...grpc.CallOption) (*SetGroupMemberBannedResp, error) + // 获取群组禁言成员 + GetGroupBannedMembers(ctx context.Context, in *GetGroupBannedMembersReq, opts ...grpc.CallOption) (*GetGroupBannedMembersResp, error) } type logicExtClient struct { @@ -3073,6 +3443,24 @@ func (c *logicExtClient) GetGroupMembers(ctx context.Context, in *GetGroupMember return out, nil } +func (c *logicExtClient) SetGroupBannedMembers(ctx context.Context, in *SetGroupMemberBannedReq, opts ...grpc.CallOption) (*SetGroupMemberBannedResp, error) { + out := new(SetGroupMemberBannedResp) + err := c.cc.Invoke(ctx, "/pb.LogicExt/SetGroupBannedMembers", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *logicExtClient) GetGroupBannedMembers(ctx context.Context, in *GetGroupBannedMembersReq, opts ...grpc.CallOption) (*GetGroupBannedMembersResp, error) { + out := new(GetGroupBannedMembersResp) + err := c.cc.Invoke(ctx, "/pb.LogicExt/GetGroupBannedMembers", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // LogicExtServer is the server API for LogicExt service. // All implementations must embed UnimplementedLogicExtServer // for forward compatibility @@ -3109,10 +3497,14 @@ type LogicExtServer interface { AddGroupMembers(context.Context, *AddGroupMembersReq) (*AddGroupMembersResp, error) // 更新群组成员信息 UpdateGroupMember(context.Context, *UpdateGroupMemberReq) (*Empty, error) - // 添加群组成员 + // 删除群组成员 DeleteGroupMember(context.Context, *DeleteGroupMemberReq) (*Empty, error) // 获取群组成员 GetGroupMembers(context.Context, *GetGroupMembersReq) (*GetGroupMembersResp, error) + // 设置禁言 + SetGroupBannedMembers(context.Context, *SetGroupMemberBannedReq) (*SetGroupMemberBannedResp, error) + // 获取群组禁言成员 + GetGroupBannedMembers(context.Context, *GetGroupBannedMembersReq) (*GetGroupBannedMembersResp, error) } // UnimplementedLogicExtServer must be embedded to have forward compatible implementations. @@ -3173,6 +3565,12 @@ func (UnimplementedLogicExtServer) DeleteGroupMember(context.Context, *DeleteGro func (UnimplementedLogicExtServer) GetGroupMembers(context.Context, *GetGroupMembersReq) (*GetGroupMembersResp, error) { return nil, status.Errorf(codes.Unimplemented, "method GetGroupMembers not implemented") } +func (UnimplementedLogicExtServer) SetGroupBannedMembers(context.Context, *SetGroupMemberBannedReq) (*SetGroupMemberBannedResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetGroupBannedMembers not implemented") +} +func (UnimplementedLogicExtServer) GetGroupBannedMembers(context.Context, *GetGroupBannedMembersReq) (*GetGroupBannedMembersResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetGroupBannedMembers not implemented") +} func RegisterLogicExtServer(s grpc.ServiceRegistrar, srv LogicExtServer) { s.RegisterService(&LogicExt_ServiceDesc, srv) @@ -3502,6 +3900,42 @@ func _LogicExt_GetGroupMembers_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } +func _LogicExt_SetGroupBannedMembers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetGroupMemberBannedReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LogicExtServer).SetGroupBannedMembers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.LogicExt/SetGroupBannedMembers", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LogicExtServer).SetGroupBannedMembers(ctx, req.(*SetGroupMemberBannedReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _LogicExt_GetGroupBannedMembers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetGroupBannedMembersReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LogicExtServer).GetGroupBannedMembers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.LogicExt/GetGroupBannedMembers", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LogicExtServer).GetGroupBannedMembers(ctx, req.(*GetGroupBannedMembersReq)) + } + return interceptor(ctx, in, info, handler) +} + // LogicExt_ServiceDesc is the grpc.ServiceDesc for LogicExt service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -3581,6 +4015,14 @@ var LogicExt_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetGroupMembers", Handler: _LogicExt_GetGroupMembers_Handler, }, + { + MethodName: "SetGroupBannedMembers", + Handler: _LogicExt_SetGroupBannedMembers_Handler, + }, + { + MethodName: "GetGroupBannedMembers", + Handler: _LogicExt_GetGroupBannedMembers_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "logic.ext.proto", diff --git a/pkg/pb/push.ext.pb.go b/pkg/pb/push.ext.pb.go index 5c12ff7..470955a 100644 --- a/pkg/pb/push.ext.pb.go +++ b/pkg/pb/push.ext.pb.go @@ -29,6 +29,7 @@ const ( PushCode_PC_UPDATE_GROUP PushCode = 110 // 更新群组 PushCode_PC_ADD_GROUP_MEMBERS PushCode = 120 // 添加群组成员 PushCode_PC_REMOVE_GROUP_MEMBER PushCode = 121 // 移除群组成员 + PushCode_PC_BANNED_GROUP_MEMBER PushCode = 122 // 禁言群组成员 ) // Enum value maps for PushCode. @@ -40,6 +41,7 @@ var ( 110: "PC_UPDATE_GROUP", 120: "PC_ADD_GROUP_MEMBERS", 121: "PC_REMOVE_GROUP_MEMBER", + 122: "PC_BANNED_GROUP_MEMBER", } PushCode_value = map[string]int32{ "PC_ADD_DEFAULT": 0, @@ -48,6 +50,7 @@ var ( "PC_UPDATE_GROUP": 110, "PC_ADD_GROUP_MEMBERS": 120, "PC_REMOVE_GROUP_MEMBER": 121, + "PC_BANNED_GROUP_MEMBER": 122, } ) @@ -438,6 +441,78 @@ func (x *RemoveGroupMemberPush) GetDeletedUserName() string { return "" } +// 删除群组成员 PC_BANNED_GROUP_MEMBER = 122 +type BannedGroupMemberPush struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + OptId int64 `protobuf:"varint,1,opt,name=opt_id,json=optId,proto3" json:"opt_id,omitempty"` // 操作人用户id + OptName string `protobuf:"bytes,2,opt,name=opt_name,json=optName,proto3" json:"opt_name,omitempty"` // 操作人昵称 + BannedUserId int64 `protobuf:"varint,3,opt,name=banned_user_id,json=bannedUserId,proto3" json:"banned_user_id,omitempty"` // 被禁言的成员id + BannedUserName string `protobuf:"bytes,4,opt,name=banned_user_name,json=bannedUserName,proto3" json:"banned_user_name,omitempty"` // 被禁言的成员昵称 +} + +func (x *BannedGroupMemberPush) Reset() { + *x = BannedGroupMemberPush{} + if protoimpl.UnsafeEnabled { + mi := &file_push_ext_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BannedGroupMemberPush) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BannedGroupMemberPush) ProtoMessage() {} + +func (x *BannedGroupMemberPush) ProtoReflect() protoreflect.Message { + mi := &file_push_ext_proto_msgTypes[5] + 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 BannedGroupMemberPush.ProtoReflect.Descriptor instead. +func (*BannedGroupMemberPush) Descriptor() ([]byte, []int) { + return file_push_ext_proto_rawDescGZIP(), []int{5} +} + +func (x *BannedGroupMemberPush) GetOptId() int64 { + if x != nil { + return x.OptId + } + return 0 +} + +func (x *BannedGroupMemberPush) GetOptName() string { + if x != nil { + return x.OptName + } + return "" +} + +func (x *BannedGroupMemberPush) GetBannedUserId() int64 { + if x != nil { + return x.BannedUserId + } + return 0 +} + +func (x *BannedGroupMemberPush) GetBannedUserName() string { + if x != nil { + return x.BannedUserName + } + return "" +} + var File_push_ext_proto protoreflect.FileDescriptor var file_push_ext_proto_rawDesc = []byte{ @@ -487,18 +562,29 @@ var file_push_ext_proto_rawDesc = []byte{ 0x65, 0x74, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x55, 0x73, - 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x2a, 0x95, 0x01, 0x0a, 0x08, 0x50, 0x75, 0x73, 0x68, 0x43, - 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x50, 0x43, 0x5f, 0x41, 0x44, 0x44, 0x5f, 0x44, 0x45, - 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x43, 0x5f, 0x41, 0x44, - 0x44, 0x5f, 0x46, 0x52, 0x49, 0x45, 0x4e, 0x44, 0x10, 0x64, 0x12, 0x17, 0x0a, 0x13, 0x50, 0x43, - 0x5f, 0x41, 0x47, 0x52, 0x45, 0x45, 0x5f, 0x41, 0x44, 0x44, 0x5f, 0x46, 0x52, 0x49, 0x45, 0x4e, - 0x44, 0x10, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x43, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, - 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x6e, 0x12, 0x18, 0x0a, 0x14, 0x50, 0x43, 0x5f, 0x41, - 0x44, 0x44, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x53, - 0x10, 0x78, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x43, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x5f, - 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x79, 0x42, 0x0d, - 0x5a, 0x0b, 0x67, 0x69, 0x6d, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x99, 0x01, 0x0a, 0x15, 0x42, 0x61, 0x6e, 0x6e, 0x65, + 0x64, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x50, 0x75, 0x73, 0x68, + 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x05, 0x6f, 0x70, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x70, 0x74, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x62, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x62, 0x61, 0x6e, 0x6e, + 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x10, 0x62, 0x61, 0x6e, 0x6e, + 0x65, 0x64, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0e, 0x62, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72, 0x4e, 0x61, + 0x6d, 0x65, 0x2a, 0xb1, 0x01, 0x0a, 0x08, 0x50, 0x75, 0x73, 0x68, 0x43, 0x6f, 0x64, 0x65, 0x12, + 0x12, 0x0a, 0x0e, 0x50, 0x43, 0x5f, 0x41, 0x44, 0x44, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, + 0x54, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x50, 0x43, 0x5f, 0x41, 0x44, 0x44, 0x5f, 0x46, 0x52, + 0x49, 0x45, 0x4e, 0x44, 0x10, 0x64, 0x12, 0x17, 0x0a, 0x13, 0x50, 0x43, 0x5f, 0x41, 0x47, 0x52, + 0x45, 0x45, 0x5f, 0x41, 0x44, 0x44, 0x5f, 0x46, 0x52, 0x49, 0x45, 0x4e, 0x44, 0x10, 0x65, 0x12, + 0x13, 0x0a, 0x0f, 0x50, 0x43, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x47, 0x52, 0x4f, + 0x55, 0x50, 0x10, 0x6e, 0x12, 0x18, 0x0a, 0x14, 0x50, 0x43, 0x5f, 0x41, 0x44, 0x44, 0x5f, 0x47, + 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x53, 0x10, 0x78, 0x12, 0x1a, + 0x0a, 0x16, 0x50, 0x43, 0x5f, 0x52, 0x45, 0x4d, 0x4f, 0x56, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, + 0x50, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x79, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x43, + 0x5f, 0x42, 0x41, 0x4e, 0x4e, 0x45, 0x44, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x4d, 0x45, + 0x4d, 0x42, 0x45, 0x52, 0x10, 0x7a, 0x42, 0x0d, 0x5a, 0x0b, 0x67, 0x69, 0x6d, 0x2f, 0x70, 0x6b, + 0x67, 0x2f, 0x70, 0x62, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -514,7 +600,7 @@ func file_push_ext_proto_rawDescGZIP() []byte { } var file_push_ext_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_push_ext_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_push_ext_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_push_ext_proto_goTypes = []interface{}{ (PushCode)(0), // 0: pb.PushCode (*AddFriendPush)(nil), // 1: pb.AddFriendPush @@ -522,10 +608,11 @@ var file_push_ext_proto_goTypes = []interface{}{ (*UpdateGroupPush)(nil), // 3: pb.UpdateGroupPush (*AddGroupMembersPush)(nil), // 4: pb.AddGroupMembersPush (*RemoveGroupMemberPush)(nil), // 5: pb.RemoveGroupMemberPush - (*GroupMember)(nil), // 6: pb.GroupMember + (*BannedGroupMemberPush)(nil), // 6: pb.BannedGroupMemberPush + (*GroupMember)(nil), // 7: pb.GroupMember } var file_push_ext_proto_depIdxs = []int32{ - 6, // 0: pb.AddGroupMembersPush.members:type_name -> pb.GroupMember + 7, // 0: pb.AddGroupMembersPush.members:type_name -> pb.GroupMember 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -600,6 +687,18 @@ func file_push_ext_proto_init() { return nil } } + file_push_ext_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BannedGroupMemberPush); 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{ @@ -607,7 +706,7 @@ func file_push_ext_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_push_ext_proto_rawDesc, NumEnums: 1, - NumMessages: 5, + NumMessages: 6, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/proto/connect.ext.proto b/pkg/proto/connect.ext.proto index fc1a15e..a536a34 100644 --- a/pkg/proto/connect.ext.proto +++ b/pkg/proto/connect.ext.proto @@ -223,3 +223,9 @@ message MessageACK { int64 device_ack = 2; // 设备收到消息的确认号 int64 receive_time = 3; // 消息接收时间戳,精确到毫秒 } + +// 群组用户状态 +enum GroupUserStatusType { + GROUP_USER_STATUS_NORMAL = 0; // 正常 + GROUP_USER_STATUS_Banned = 1; // 禁言 +} \ No newline at end of file diff --git a/pkg/proto/logic.ext.proto b/pkg/proto/logic.ext.proto index 35eea34..2dfc174 100644 --- a/pkg/proto/logic.ext.proto +++ b/pkg/proto/logic.ext.proto @@ -43,10 +43,14 @@ service LogicExt { rpc AddGroupMembers (AddGroupMembersReq) returns (AddGroupMembersResp); // 更新群组成员信息 rpc UpdateGroupMember (UpdateGroupMemberReq) returns (Empty); - // 添加群组成员 + // 删除群组成员 rpc DeleteGroupMember (DeleteGroupMemberReq) returns (Empty); // 获取群组成员 rpc GetGroupMembers (GetGroupMembersReq) returns (GetGroupMembersResp); + // 设置禁言 + rpc SetGroupBannedMembers (SetGroupMemberBannedReq) returns (SetGroupMemberBannedResp); + // 获取群组禁言成员 + rpc GetGroupBannedMembers (GetGroupBannedMembersReq) returns (GetGroupBannedMembersResp); } message RegisterDeviceReq { @@ -235,4 +239,28 @@ message GroupMember { MemberType member_type = 6; // 成员类型 string remarks = 7; // 备注 string extra = 8; // 群组成员附加字段 +} + +message SetGroupMemberBannedReq { + int64 group_id = 1; // 群组id + repeated int64 user_ids = 2; // 用户id列表 + AllMemberBannedType is_all_member_banned = 3; // 全员禁言(1:是 2:否) +} + +enum AllMemberBannedType { + UNKNOWN_All_Member_Banned = 0; // 未知 + YES_All_Member_Banned = 1; // 是-全员禁言 + NOT_All_Member_Banned = 2; // 否-全员禁言 +} + +message SetGroupMemberBannedResp { + AllMemberBannedType is_all_member_banned = 3; // 全员禁言(1:是 2:否) + repeated GroupMember members = 1; //禁言人员列表 +} + +message GetGroupBannedMembersReq { + int64 group_id = 1; +} +message GetGroupBannedMembersResp { + repeated GroupMember members = 1; } \ No newline at end of file diff --git a/pkg/proto/push.ext.proto b/pkg/proto/push.ext.proto index 83834f4..5183de3 100644 --- a/pkg/proto/push.ext.proto +++ b/pkg/proto/push.ext.proto @@ -15,6 +15,8 @@ enum PushCode { PC_ADD_GROUP_MEMBERS = 120; // 添加群组成员 PC_REMOVE_GROUP_MEMBER = 121; // 移除群组成员 + PC_BANNED_GROUP_MEMBER = 122; // 禁言群组成员 + } // 推送码 PC_ADD_FRIEND = 100 @@ -56,3 +58,12 @@ message RemoveGroupMemberPush { int64 deleted_user_id = 3; // 被删除的成员id string deleted_user_name = 4; // 被删除的成员昵称 } + +// 删除群组成员 PC_BANNED_GROUP_MEMBER = 122 +message BannedGroupMemberPush { + int64 opt_id = 1; // 操作人用户id + string opt_name = 2; // 操作人昵称 + int64 banned_user_id = 3; // 被禁言的成员id + string banned_user_name = 4; // 被禁言的成员昵称 +} +