Open itsthejoker opened 2 years ago
It looks like this will involve porting the ban management over to Blossom entirely -- keeping track of bans that have variable times and such. I'm imagining that it might look like this:
class Ban(models.Model):
user = FK(BlossomUser)
reason = charfield()
created = datetimefield()
expires = datetimefield()
banned_by = FK(BlossomUser)
is_permanent = bool()
def is_active(self):
return self.is_permanent or datetime.now() > self.expires
Looks good, that would allow us to manage the bans within Slack as well. On top of that we could also introduce a computed field on the BlossomUser
to indicate whether any ban is currently active for this user.
This could also integrate with a warning system that we will probably add at some point.
What exactly does this entail?