Skip to content

Conversation

Zabuzard
Copy link
Member

@Zabuzard Zabuzard commented Jul 7, 2022

Overview

Fixes a bug with temporary moderation actions being revoked too early in certain edge cases.

Basically, the issue occurs if a user already had a temporary action in the past, which was also revoked already. The next temporary action will then be revoked too early, since the code picks up the old expired action and figures "oh, lets revoke it".

This introduces a small fix where the code will always look at the last apply-action first and only proceeds revoking if that one has already expired.

@Zabuzard Zabuzard added bug Something isn't working priority: normal labels Jul 7, 2022
@Zabuzard Zabuzard self-assigned this Jul 7, 2022
@Zabuzard Zabuzard requested review from a team as code owners July 7, 2022 07:05
Tais993
Tais993 previously approved these changes Jul 7, 2022
@Zabuzard
Copy link
Member Author

Zabuzard commented Jul 7, 2022

Tested, works:

logs

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 7, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@java-coding-prodigy java-coding-prodigy left a comment

Choose a reason for hiding this comment

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

LGTM

@Zabuzard Zabuzard merged commit fd3681c into develop Jul 7, 2022
@Zabuzard Zabuzard deleted the bugfix/temp_actions_revoked_too_early branch July 7, 2022 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority: normal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants