Skip to content
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

LB-1729: Flairs settings shows incorrect time remaining #3153

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

fettuccinae
Copy link
Contributor

Problem

Flair section in settings page shows the invalid status of user's flair. It uses both LB API's endpoint (donors/all-flairs) and MB's endpoint(nag-check), MB's endpoint returns the user's donation data without setting the threshold (FLAIR_MONTHLY_DONATION_THRESHOLD = 5) and it overrides the flairUnlocked value.

https://tickets.metabrainz.org/browse/LB-1729

Solution

By discarding the nag value returned by nag-checker and not setting flairUnlocked value to it, we can just use LB's endpoint to verify user's donation status and then use nag-checker's daysLeft value to show the time left.

Copy link
Member

@MonkeyDo MonkeyDo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!
I think this is a good stopgap measure to not show confusing information to the user, until we figure out how we want to fix the larger issue (considering the daysLeft is also calculated without the threshold, so is probably not completely correct either)

@MonkeyDo
Copy link
Member

I will ask however that you describe future commits more clearly than a single word 😃

@MonkeyDo MonkeyDo merged commit 1e07bb6 into metabrainz:master Jan 28, 2025
2 checks passed
@fettuccinae
Copy link
Contributor Author

I will ask however that you describe future commits more clearly than a single word 😃

Sorry about that, my git was having some problems yesterday. Will take care from next time 👍

@fettuccinae
Copy link
Contributor Author

Thank you! I think this is a good stopgap measure to not show confusing information to the user, until we figure out how we want to fix the larger issue (considering the daysLeft is also calculated without the threshold, so is probably not completely correct either)

Thanks! do we have any ideas on how we might approach fixing the larger issue?

@MonkeyDo
Copy link
Member

I think that one is going to require more team members and a long discussion. I'm currently not sure how to go about it, but all in all I think this will require someone from the MetaBrainz team to solve, and we possibly have to wait until some other project is finished (we are in the —very slow— process of moving user accounts from the MusicBrainz databse to the MetaBrainz DB).

So I guess don't worry about it, you've done all you can be expected to do on this topic for now :)
Thanks again for the simple solution!

@fettuccinae fettuccinae deleted the LB-1729 branch January 29, 2025 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants