]> Untitled Git - lemmy.git/blobdiff - crates/apub/src/objects/mod.rs
Remove check that avatars/banners are locally hosted (fixes #2254) (#2255)
[lemmy.git] / crates / apub / src / objects / mod.rs
index 7d5fd26edb7a7d586d8a4167379eb3cb05cf1e18..b3aa80b54868d2c7a25c737692c261379e8750cd 100644 (file)
@@ -1,7 +1,7 @@
-use crate::protocol::{ImageObject, Source};
+use crate::protocol::Source;
 use anyhow::anyhow;
 use html2md::parse_html;
-use lemmy_apub_lib::{values::MediaTypeMarkdownOrHtml, verify::verify_domains_match};
+use lemmy_apub_lib::values::MediaTypeMarkdownOrHtml;
 use lemmy_utils::{settings::structs::Settings, LemmyError};
 use url::Url;
 
@@ -39,17 +39,6 @@ pub(crate) fn read_from_string_or_source_opt(
     .map(|content| read_from_string_or_source(content, media_type, source))
 }
 
-pub(crate) fn verify_image_domain_matches(
-  a: &Url,
-  b: &Option<ImageObject>,
-) -> Result<(), LemmyError> {
-  if let Some(b) = b {
-    verify_domains_match(a, &b.url)
-  } else {
-    Ok(())
-  }
-}
-
 /// When for example a Post is made in a remote community, the community will send it back,
 /// wrapped in Announce. If we simply receive this like any other federated object, overwrite the
 /// existing, local Post. In particular, it will set the field local = false, so that the object