Skip to content

Commit

Permalink
change to list
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-sidhdhi-p committed Sep 19, 2024
1 parent 0c94820 commit 54d90f1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions khelo/functions/src/match/match_service.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ class MatchService {
const matchContributorIds = new Set([
...(match.created_by !== null ? [match.created_by] : []),
...(match.referee_id !== null ? [match.referee_id] : []),
...match.players.filter(e => e !== null),
...match.scorer_ids.filter(e => e !== null),
...match.umpire_ids.filter(e => e !== null),
...match.commentator_ids.filter(e => e !== null),
...match.players.filter((e) => e !== null),
...match.scorer_ids.filter((e) => e !== null),
...match.umpire_ids.filter((e) => e !== null),
...match.commentator_ids.filter((e) => e !== null),
]);
console.log("Contributors in match:", matchContributorIds);
if (matchContributorIds.length === 0) {
return;
}
const matchContributors = await this.userRepository.getUsers(matchContributorIds);
const matchContributors = await this.userRepository.getUsers([...matchContributorIds]);
const usersToNotify = matchContributors.filter((m) => user_models.userNotificationEnabled(m)).map((m)=> m.id);

console.log("Users to notify:", usersToNotify);
Expand Down

0 comments on commit 54d90f1

Please sign in to comment.