X-Git-Url: http://these/git/?a=blobdiff_plain;f=src%2Fapub%2Fcommunity.rs;fp=server%2Fsrc%2Fapub%2Fcommunity.rs;h=8f64c671d780bfa4e12729929a101b48e58e22f4;hb=5c6258390c46159c16f49295314c6519215fc6ae;hp=89819f4531becb588f700493e35f5d39ea04354a;hpb=b69524b498983da636b3a31f5acb74fbb1f13ab4;p=lemmy.git diff --git a/server/src/apub/community.rs b/src/apub/community.rs similarity index 97% rename from server/src/apub/community.rs rename to src/apub/community.rs index 89819f45..8f64c671 100644 --- a/server/src/apub/community.rs +++ b/src/apub/community.rs @@ -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())