mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-02-03 00:31:25 -08:00
stop pages.dev spam
This commit is contained in:
parent
6a820442f5
commit
024e1f37fb
1 changed files with 4 additions and 4 deletions
|
@ -1749,12 +1749,12 @@ def create_post(activity_log: ActivityPubLog, community: Community, request_json
|
|||
url=post.ap_id, user_id=admin.id,
|
||||
author_id=user.id)
|
||||
db.session.add(notify)
|
||||
if not domain.banned:
|
||||
domain.post_count += 1
|
||||
post.domain = domain
|
||||
else:
|
||||
if domain.banned or domain.name.endswith('.pages.dev'):
|
||||
post = None
|
||||
activity_log.exception_message = domain.name + ' is blocked by admin'
|
||||
else:
|
||||
domain.post_count += 1
|
||||
post.domain = domain
|
||||
|
||||
if post is not None:
|
||||
if request_json['object']['type'] == 'Video':
|
||||
|
|
Loading…
Add table
Reference in a new issue