Skip to content

Commit e110913

Browse files
committed
fix: use matched user instead
1 parent 6e57576 commit e110913

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/matching-service/processes/findmatches.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func foundMatch(tx *redis.Tx, ctx context.Context, currentUser *models.MatchRequ
7474
}
7575

7676
var matchedTopics []string
77-
if len(currentUser.Topics) == 0 || len(currentUser.Topics) == 0 {
77+
if len(currentUser.Topics) == 0 || len(matchedUser.Topics) == 0 {
7878
// Ensure that matchedTopics will not be empty unless both users are empty
7979
for _, topic := range currentUser.Topics {
8080
matchedTopics = append(matchedTopics, topic)
@@ -92,7 +92,7 @@ func foundMatch(tx *redis.Tx, ctx context.Context, currentUser *models.MatchRequ
9292
}
9393
}
9494
var matchedDifficulties []string
95-
if len(currentUser.Difficulties) == 0 || len(currentUser.Difficulties) == 0 {
95+
if len(currentUser.Difficulties) == 0 || len(matchedUser.Difficulties) == 0 {
9696
// Ensure that matchedDifficulties will not be empty unless both users are empty
9797
for _, diff := range currentUser.Difficulties {
9898
matchedDifficulties = append(matchedDifficulties, diff)

0 commit comments

Comments
 (0)