mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
only process post image if post url not banned
This commit is contained in:
parent
5fb05f3e2f
commit
9291821835
1 changed files with 3 additions and 3 deletions
|
@ -1278,12 +1278,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 domain.banned:
|
||||
post = None
|
||||
activity_log.exception_message = domain.name + ' is blocked by admin'
|
||||
if not domain.banned:
|
||||
domain.post_count += 1
|
||||
post.domain = domain
|
||||
else:
|
||||
post = None
|
||||
activity_log.exception_message = domain.name + ' is blocked by admin'
|
||||
if post is not None:
|
||||
if 'image' in request_json['object'] and post.image is None:
|
||||
image = File(source_url=request_json['object']['image']['url'])
|
||||
|
|
Loading…
Reference in a new issue