Add full URL generation to image_serializer

This commit is contained in:
Joachim
2021-10-27 18:56:37 +02:00
parent 35bd4a4071
commit b956b79bd0
2 changed files with 11 additions and 6 deletions

View File

@ -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)