Make Media follow activitystreams API change

This commit is contained in:
Kitaiti Makoto 2022-01-23 08:31:41 +09:00
parent 86c88a9326
commit 5a39589289

View File

@ -210,11 +210,7 @@ impl Media {
// TODO: merge with save_remote?
pub fn from_activity(conn: &DbConn, image: &Image) -> Result<Media> {
let remote_url = image
.id(&Instance::get_local()?.public_domain)
.expect("authorized domain")
.expect("exists and only")
.as_str();
let remote_url = image.id().expect("exists and only").as_str();
let path = determine_mirror_file_path(remote_url);
let parent = path.parent().ok_or(Error::InvalidValue)?;
if !parent.is_dir() {