Make Media follow activitystreams API change
This commit is contained in:
parent
86c88a9326
commit
5a39589289
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user