UpdateQuestionInviteUser

This commit is contained in:
aichy126 2023-06-01 11:13:02 +08:00
parent 8431f9ab13
commit 3e219569b6
1 changed files with 4 additions and 1 deletions

View File

@ -566,7 +566,10 @@ func (qs *QuestionService) UpdateQuestionInviteUser(ctx context.Context, req *sc
for _, item := range req.InviteUser {
_, ok := inviteUserInfoList[item]
if ok {
inviteUserIDs = append(inviteUserIDs, inviteUserInfoList[item].ID)
//The inviter can't be himself.
if req.UserID != inviteUserInfoList[item].ID {
inviteUserIDs = append(inviteUserIDs, inviteUserInfoList[item].ID)
}
}
}
inviteUserStr := ""