From 04b7e6b75ef8133c3d9401ea1e8e328ebbf0f9e8 Mon Sep 17 00:00:00 2001 From: OpenIM-Robot Date: Wed, 12 Mar 2025 11:47:02 +0800 Subject: [PATCH] fix: solve unocrrect invite notification (#3213) (#3219) Co-authored-by: Monet Lee --- internal/rpc/group/group.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/rpc/group/group.go b/internal/rpc/group/group.go index 2cd6c4f27..b97b66a24 100644 --- a/internal/rpc/group/group.go +++ b/internal/rpc/group/group.go @@ -395,6 +395,8 @@ func (g *groupServer) InviteUserToGroup(ctx context.Context, req *pbgroup.Invite if err := g.PopulateGroupMember(ctx, groupMember); err != nil { return nil, err } + } else { + opUserID = mcontext.GetOpUserID(ctx) } if err := g.webhookBeforeInviteUserToGroup(ctx, &g.config.WebhooksConfig.BeforeInviteUserToGroup, req); err != nil && err != servererrs.ErrCallbackContinue { @@ -430,6 +432,7 @@ func (g *groupServer) InviteUserToGroup(ctx context.Context, req *pbgroup.Invite } } } + var groupMembers []*model.GroupMember for _, userID := range req.InvitedUserIDs { member := &model.GroupMember{