bug when sending link posts to lemmy

This commit is contained in:
rimu 2024-01-08 22:48:03 +13:00
parent 40f53d9cd3
commit ec4be34d5d

View file

@ -381,7 +381,7 @@ def add_post(actor):
} }
if post.type == POST_TYPE_LINK: if post.type == POST_TYPE_LINK:
page['attachment'] = [{'href': post.url, 'type': 'Link'}] page['attachment'] = [{'href': post.url, 'type': 'Link'}]
if post.image_id: elif post.image_id:
if post.image.file_path: if post.image.file_path:
image_url = post.image.file_path.replace('app/static/', f"https://{current_app.config['SERVER_NAME']}/static/") image_url = post.image.file_path.replace('app/static/', f"https://{current_app.config['SERVER_NAME']}/static/")
elif post.image.thumbnail_path: elif post.image.thumbnail_path: