|
|
@@ -280,6 +280,21 @@ func (s *LogicExtServer) AddGroupMembers(ctx context.Context, in *pb.AddGroupMem |
|
|
|
return &pb.AddGroupMembersResp{UserIds: userIds}, err |
|
|
|
} |
|
|
|
|
|
|
|
func (s *LogicExtServer) ScanQrCodeAddGroup(ctx context.Context, in *pb.ScanQrCodeAddGroupReq) (*pb.ScanQrCodeAddGroupResp, error) { |
|
|
|
userId, _, err := grpclib.GetCtxData(ctx) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|
} |
|
|
|
userIds, err := app.GroupApp.AddMembers(ctx, -2, in.GroupId, []int64{userId}) |
|
|
|
var isAlready bool |
|
|
|
for _, v := range userIds { |
|
|
|
if v == userId { |
|
|
|
isAlready = true |
|
|
|
} |
|
|
|
} |
|
|
|
return &pb.ScanQrCodeAddGroupResp{IsAlready: isAlready}, err |
|
|
|
} |
|
|
|
|
|
|
|
// UpdateGroupMember 更新群组成员信息 |
|
|
|
func (*LogicExtServer) UpdateGroupMember(ctx context.Context, in *pb.UpdateGroupMemberReq) (*pb.Empty, error) { |
|
|
|
userId, _, err := grpclib.GetCtxData(ctx) |
|
|
|