Merge pull request 'make admin exempt from created_recently restrictions' (#223) from h3ndrik/pyfedi:created_recently into main

Reviewed-on: https://codeberg.org/rimu/pyfedi/pulls/223
This commit is contained in:
rimu 2024-06-26 09:39:57 +00:00
commit 72320a0178

View file

@ -846,6 +846,8 @@ class User(UserMixin, db.Model):
return result
def created_recently(self):
if self.is_admin():
return False
return self.created and self.created > utcnow() - timedelta(days=7)
def has_blocked_instance(self, instance_id: int):