fix: solve unocrrect invite notification

This commit is contained in:
Monet Lee 2025-03-12 11:07:52 +08:00
parent 7859f2ccb3
commit 63fc7c244b

View File

@ -390,6 +390,8 @@ func (g *groupServer) InviteUserToGroup(ctx context.Context, req *pbgroup.Invite
if err := g.PopulateGroupMember(ctx, groupMember); err != nil { if err := g.PopulateGroupMember(ctx, groupMember); err != nil {
return nil, err return nil, err
} }
} else {
opUserID = mcontext.GetOpUserID(ctx)
} }
if err := g.webhookBeforeInviteUserToGroup(ctx, &g.config.WebhooksConfig.BeforeInviteUserToGroup, req); err != nil && err != servererrs.ErrCallbackContinue { if err := g.webhookBeforeInviteUserToGroup(ctx, &g.config.WebhooksConfig.BeforeInviteUserToGroup, req); err != nil && err != servererrs.ErrCallbackContinue {
@ -425,6 +427,7 @@ func (g *groupServer) InviteUserToGroup(ctx context.Context, req *pbgroup.Invite
} }
} }
} }
var groupMembers []*model.GroupMember var groupMembers []*model.GroupMember
for _, userID := range req.InvitedUserIDs { for _, userID := range req.InvitedUserIDs {
member := &model.GroupMember{ member := &model.GroupMember{