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

Implement unbanning logic #2

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

nexy7574
Copy link

@nexy7574 nexy7574 commented Feb 1, 2025

This PR implements the following:

  • Unbanning when a policy is removed
  • Unbanning when an unban policy is added
  • !remove-ban command
  • !add-unban command

@nexy7574
Copy link
Author

nexy7574 commented Feb 1, 2025

Just needs tidying up and possibly a review of the unban logic since I'm not convinced this is the right way to do it

@@ -39,6 +43,30 @@ func (pe *PolicyEvaluator) HandleCommand(ctx context.Context, evt *event.Event)
}
}
pe.sendSuccessReaction(ctx, evt.ID)
case "!leave":
Copy link
Author

Choose a reason for hiding this comment

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

This accidentally made its way in from an unstaged commit from #1, needs removing

Entity: action.RuleEntity,
},
}
pe.ApplyUnban(ctx, action.TargetUser, action.InRoomID, policy)
Copy link
Author

Choose a reason for hiding this comment

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

I think I need to check somewhere that auto_unban is enabled for the list that created the policy, this just blanket unbans at the moment

@nexy7574 nexy7574 closed this Feb 2, 2025
@nexy7574
Copy link
Author

nexy7574 commented Feb 2, 2025

might come back to it later but atm I don't really have the time or motivation to actually complete this and I don't want it to sit in a draft for months 🥴

@nexy7574 nexy7574 reopened this Feb 10, 2025
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.

1 participant