-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: participation streak templates #964
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good work! 🎉 a few questions below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest looks good to me 👍🏼
await prisma.user_achievement.update({ | ||
where: { id: userAchievements[currentAchievementIndex].id }, | ||
data: { achievedAt: null, isSeen: false }, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that this belongs here.
It would mean that we have an invalid state for some reason, which shouldn't be fixed while assembling data
.
When does it happen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imagine you have a streak of 25 consecutive meetings joined.
Now you do not join any more meetings. You do not fire any more events "match_meeting_joined" or what ever the action name is.
The streak would never be resolved into being 0 because we never reevaluate. We offered a cronjob, that was already implemented, but that was not wanted either. So we have to update streaks here.
closes: https://github.com/corona-school/project-user/issues/1100
closes: https://github.com/corona-school/project-user/issues/1099
What was done: