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

postBranding.ts webhook changes #588

Merged
merged 3 commits into from
Aug 4, 2024

Conversation

mini-bomba
Copy link
Contributor

@mini-bomba mini-bomba commented Aug 3, 2024

  • I agree to license my contribution under AGPL-3.0-only with my contribution automatically being licensed under LGPL-3.0 additionally after 6 months

quick, absolutely untested fix (testing in production is the only valid way to test this)
i actually tested this locally now

Changes made:

  • Don't send messages about an unlocked title having more votes than a locked one when the unlocked one is downvoted
  • Take downvotes and verification into consideration when comparing titles in webhook code
  • Send title score instead of just upvotes in the webhook message
  • Send a message when a locked title is (attempted to be) downvoted
  • Reformat SQL queries to (hopefully) be more readable

voteType passed to sendWebhooks() function to avoid confusion in the
future should someone forget about the if statement
also take downvotes & verification into consideration when comparing
titles in webhook code
@mini-bomba mini-bomba force-pushed the dearrow-locked-titles-downvotes branch from 15a1b53 to 72086b0 Compare August 3, 2024 19:57
@mini-bomba mini-bomba changed the title Don't send to #dearrow-locked-titles when downvoting unlocked title postBranding.ts webhook changes Aug 3, 2024
@ajayyy ajayyy merged commit 8da5de4 into ajayyy:master Aug 4, 2024
4 checks passed
@mini-bomba mini-bomba deleted the dearrow-locked-titles-downvotes branch August 4, 2024 12:37
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