Source,
},
};
-use activitystreams::{actor::kind::GroupType, object::kind::ImageType};
+use activitystreams_kinds::actor::GroupType;
use chrono::NaiveDateTime;
use itertools::Itertools;
use lemmy_api_common::blocking;
content: bio,
media_type: MediaTypeMarkdown::Markdown,
});
- let icon = self.icon.clone().map(|url| ImageObject {
- kind: ImageType::Image,
- url: url.into(),
- });
- let image = self.banner.clone().map(|url| ImageObject {
- kind: ImageType::Image,
- url: url.into(),
- });
+ let icon = self.icon.clone().map(ImageObject::new);
+ let image = self.banner.clone().map(ImageObject::new);
let group = Group {
kind: GroupType::Group,
fn actor_id(&self) -> Url {
self.actor_id.to_owned().into()
}
- fn public_key(&self) -> Option<String> {
+ fn public_key(&self) -> String {
self.public_key.to_owned()
}
fn private_key(&self) -> Option<String> {
let community = parse_lemmy_community(&context).await;
assert_eq!(community.title, "Ten Forward");
- assert!(community.public_key.is_some());
assert!(!community.local);
assert_eq!(community.description.as_ref().unwrap().len(), 132);