diff --git a/app/models/users.py b/app/models/users.py index e726118f..e6d73696 100644 --- a/app/models/users.py +++ b/app/models/users.py @@ -275,12 +275,12 @@ class User(db.Model, UserMixin): one_min_ago = datetime.datetime.utcnow() - datetime.timedelta(minutes=1) if ThreadReply.query.filter_by(author=self) \ - .filter(ThreadReply.created_at > one_min_ago).count() >= 2 * factor: + .filter(ThreadReply.created_at > one_min_ago, ThreadReply.is_status_update == False).count() >= 2 * factor: return False hour_ago = datetime.datetime.utcnow() - datetime.timedelta(hours=1) if ThreadReply.query.filter_by(author=self) \ - .filter(ThreadReply.created_at > hour_ago).count() >= 10 * factor: + .filter(ThreadReply.created_at > hour_ago, ThreadReply.is_status_update == False).count() >= 10 * factor: return False return True