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

Add cooldown time between blogs/comments creation #297

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

jalsol
Copy link
Collaborator

@jalsol jalsol commented Apr 10, 2023

Description

Type of change: new feature

What

Adds cooldown time between the creation of two blogs or two comments.

The cooldown time can be changed by modifying the value of VNOJ_COMMENT_COOLDOWN and VNOJ_BLOG_COOLDOWN, respectively.

Why

To avoid spam.

How Has This Been Tested?

Tested manually on my local version of VNOJ.

Checklist

  • I have explained the purpose of this PR.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the README/documentation
  • Any dependent changes have been merged and published in downstream modules
  • Informed of breaking changes, testing and migrations (if applicable).
  • Attached screenshots (if applicable).

By submitting this pull request, I confirm that my contribution is made under the terms of the AGPL-3.0 License.

judge/comments.py Outdated Show resolved Hide resolved
@jalsol jalsol force-pushed the interaction-cooldown branch from bffda9b to 0c42d7d Compare May 2, 2023 16:57
dmoj/settings.py Outdated Show resolved Hide resolved
judge/comments.py Outdated Show resolved Hide resolved
judge/views/blog.py Outdated Show resolved Hide resolved
@hieplpvip hieplpvip force-pushed the interaction-cooldown branch from 1b2ce46 to c2fffa3 Compare May 14, 2023 23:52
jalsol added 7 commits May 15, 2023 08:39
- Cooldown time are now in seconds instead of minutes
- Each user can now comment every 60 seconds instead of 10 minutes
- This should be friendlier and more informative to users
- The time format is M:S instead of S since "179 minutes and 59 seconds"
  is more intuitive than "10799 seconds"
@hieplpvip hieplpvip force-pushed the interaction-cooldown branch from c2fffa3 to d9ff91d Compare May 15, 2023 01:39
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.

3 participants