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

Don't update deactivates_at if block was already viewed #5312

Merged

Conversation

AntonKhorev
Copy link
Collaborator

When a blocked user visits their block page, its deactivation time is recorded. Problem is this only needs to happen if there's no deactivation time set. If it's already set, it should be kept at what it is.

The possible bug is that if the user visits their block page after the block is lifted, that visit time gets into deactivates_at and is reported as the block end time despite the block ending earlier.

@AntonKhorev AntonKhorev added bug Something is broken or not working as expected moderation Related to moderator features, like reports, issues or user blocks labels Nov 11, 2024
test/controllers/user_blocks_controller_test.rb Outdated Show resolved Hide resolved
test/controllers/user_blocks_controller_test.rb Outdated Show resolved Hide resolved
@AntonKhorev AntonKhorev force-pushed the no-extra-deactivates_at-updates branch from f420886 to ff05698 Compare November 12, 2024 22:41
Copy link
Member

@tomhughes tomhughes left a comment

Choose a reason for hiding this comment

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

Looks good now, thanks.

@tomhughes tomhughes merged commit d975100 into openstreetmap:master Nov 13, 2024
22 checks passed
@AntonKhorev AntonKhorev deleted the no-extra-deactivates_at-updates branch November 14, 2024 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken or not working as expected moderation Related to moderator features, like reports, issues or user blocks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants