From 720c351da8e5be564f7bd1fb4fab4ef324c0d5f1 Mon Sep 17 00:00:00 2001 From: withchao <993506633@qq.com> Date: Fri, 19 May 2023 16:34:16 +0800 Subject: [PATCH] group notification --- pkg/rpcclient/notification/group.go | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/pkg/rpcclient/notification/group.go b/pkg/rpcclient/notification/group.go index 18c64464e..054ed744f 100644 --- a/pkg/rpcclient/notification/group.go +++ b/pkg/rpcclient/notification/group.go @@ -374,29 +374,28 @@ func (g *GroupNotificationSender) MemberQuitNotification(ctx context.Context, re if err != nil { return err } - // todo 退群后查不到 opUserID := mcontext.GetOpUserID(ctx) user, err := g.getUser(ctx, opUserID) if err != nil { return err } - userIDs, err := g.getGroupOwnerAndAdminUserID(ctx, req.GroupID) - if err != nil { - return err - } + //userIDs, err := g.getGroupOwnerAndAdminUserID(ctx, req.GroupID) + //if err != nil { + // return err + //} tips := &sdkws.MemberQuitTips{Group: group, QuitUser: &sdkws.GroupMemberFullInfo{ GroupID: group.GroupID, UserID: user.UserID, Nickname: user.Nickname, FaceURL: user.FaceURL, }} - for _, userID := range append(userIDs, opUserID) { - err = g.msgClient.Notification(ctx, mcontext.GetOpUserID(ctx), userID, constant.MemberQuitNotification, tips) - if err != nil { - return err - } - } - return nil + //for _, userID := range append(userIDs, opUserID) { + // err = g.msgClient.Notification(ctx, mcontext.GetOpUserID(ctx), userID, constant.MemberQuitNotification, tips) + // if err != nil { + // log.ZError(ctx, "MemberQuitNotification failed", err, "group", req.GroupID, "userID", userID) + // } + //} + return g.msgClient.Notification(ctx, mcontext.GetOpUserID(ctx), req.GroupID, constant.MemberQuitNotification, tips) } func (g *GroupNotificationSender) GroupApplicationAcceptedNotification(ctx context.Context, req *pbGroup.GroupApplicationResponseReq) (err error) {