mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
use thumbnail image for videos when updating #366
This commit is contained in:
parent
36b272e797
commit
82be9f9475
1 changed files with 4 additions and 1 deletions
|
@ -1862,7 +1862,10 @@ def update_post_from_activity(post: Post, request_json: dict):
|
|||
image.alt_text = request_json['object']['attachment'][0]['name']
|
||||
elif is_video_url(new_url):
|
||||
post.type = POST_TYPE_VIDEO
|
||||
image = File(source_url=new_url)
|
||||
if 'image' in request_json['object'] and 'url' in request_json['object']['image']:
|
||||
image = File(source_url=request_json['object']['image']['url'])
|
||||
else:
|
||||
image = File(source_url=new_url)
|
||||
else:
|
||||
if 'image' in request_json['object'] and 'url' in request_json['object']['image']:
|
||||
image = File(source_url=request_json['object']['image']['url'])
|
||||
|
|
Loading…
Reference in a new issue