Add full URL generation to image_serializer
This commit is contained in:
parent
35bd4a4071
commit
b956b79bd0
2 changed files with 11 additions and 6 deletions
|
@ -389,6 +389,10 @@ def image_serializer(value, alt):
|
|||
url = value.url
|
||||
else:
|
||||
return None
|
||||
if url is not None:
|
||||
url = url.lstrip("/")
|
||||
url = urljoin(MEDIA_FULL_URL, url)
|
||||
|
||||
return activitypub.Document(url=url, name=alt)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue