]> Untitled Git - lemmy.git/blobdiff - src/apub/community.rs
Isomorphic docker (#1124)
[lemmy.git] / src / apub / community.rs
similarity index 97%
rename from server/src/apub/community.rs
rename to src/apub/community.rs
index 89819f4531becb588f700493e35f5d39ea04354a..8f64c671d780bfa4e12729929a101b48e58e22f4 100644 (file)
@@ -94,6 +94,18 @@ impl ToApub for Community {
       group.set_content(d);
     }
 
+    if let Some(icon) = &self.icon {
+      let mut image = Image::new();
+      image.set_url(icon.to_owned());
+      group.set_icon(image.into_any_base()?);
+    }
+
+    if let Some(banner_url) = &self.banner {
+      let mut image = Image::new();
+      image.set_url(banner_url.to_owned());
+      group.set_image(image.into_any_base()?);
+    }
+
     let mut ap_actor = ApActor::new(self.get_inbox_url()?, group);
     ap_actor
       .set_preferred_username(self.title.to_owned())