From 72637fe80c876a20028bd435490242048d63c30c Mon Sep 17 00:00:00 2001 From: silverpill Date: Sat, 14 Jan 2023 19:34:08 +0000 Subject: [PATCH] Add mediaType property to images in actor object --- CHANGELOG.md | 1 + src/activitypub/actors/types.rs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b3bd4b..138b0b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Save downloaded media as "unknown" if its media type is not supported. - Use `mediaType` property value to determine file extension when saving downloaded media. +- Added `mediaType` property to images in actor object. ### Removed diff --git a/src/activitypub/actors/types.rs b/src/activitypub/actors/types.rs index 637028b..5d3f9c7 100644 --- a/src/activitypub/actors/types.rs +++ b/src/activitypub/actors/types.rs @@ -241,7 +241,7 @@ pub fn get_local_actor( let actor_image = ActorImage { object_type: IMAGE.to_string(), url: get_file_url(instance_url, &image.file_name), - media_type: None, + media_type: image.media_type.clone(), }; Some(actor_image) }, @@ -252,7 +252,7 @@ pub fn get_local_actor( let actor_image = ActorImage { object_type: IMAGE.to_string(), url: get_file_url(instance_url, &image.file_name), - media_type: None, + media_type: image.media_type.clone(), }; Some(actor_image) },