A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
fix(vote): There is no return of rank for users who was canceled their down votes.
LinkinStar02a56315b4b2
diff --git a/internal/repo/activity/vote_repo.go b/internal/repo/activity/vote_repo.goindex 208028df..bb2f1ef0 100644--- a/internal/repo/activity/vote_repo.go+++ b/internal/repo/activity/vote_repo.go@@ -220,7 +220,7 @@ func (vr *VoteRepo) voteCancel(ctx context.Context, objectID string, userID, obj}// trigger user rank and send notification- if hasRank != 0 && existsActivity.Rank > 0 {+ if hasRank != 0 && existsActivity.Rank != 0 {_, err = vr.userRankRepo.TriggerUserRank(ctx, session, activityUserID, -deltaRank, activityType)if err != nil {return