Receive and save incoming images

This commit is contained in:
Mouse Reeve
2020-11-24 11:25:07 -08:00
parent 88e4705717
commit ad7ce6595b
7 changed files with 62 additions and 29 deletions

View File

@ -100,7 +100,9 @@ class Book(ActivitypubMixin, BookWyrmModel):
ActivityMapping('editions', 'editions_path'),
ActivityMapping(
'attachment', 'cover',
image_attachments_formatter
# this expects an iterable and the field is just an image
lambda x: image_attachments_formatter([x]),
lambda x: activitypub.image_attachments_formatter(x)[0]
),
]