Skip to content

Commit

Permalink
Merge pull request #739 from Roguelike-Celebration/fix-duplicate-badg…
Browse files Browse the repository at this point in the history
…e-reward

room fix for dupe badge submission
  • Loading branch information
MoyTW authored Oct 22, 2022
2 parents 1ee6ff0 + 0fdfda2 commit c3553d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/src/moveToRoom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ function awardBadges (user: User, roomId: string) {

tuples.forEach(([room, emoji]) => {
if (roomId === room &&
!includes(user.unlockedBadges, UnlockableBadgeMap[emoji])) {
!includes(user.unlockedBadges.map(b => b.emoji), emoji)) {
console.log('Awarding badge', emoji, UnlockableBadgeMap[emoji])
awardUserBadge(user.id, UnlockableBadgeMap[emoji])
unlockedEmoji.push(UnlockableBadgeMap[emoji])
Expand Down

0 comments on commit c3553d8

Please sign in to comment.