activities::community::announce::{AnnounceActivity, RawAnnouncableActivities},
Id,
IdOrNestedObject,
+ InCommunity,
},
ActorType,
};
if let AnnouncableActivities::Page(_) = activity {
return Err(LemmyError::from_message("Cant receive page"));
}
- let community = activity.get_community(data, &mut 0).await?;
+ let community = activity.community(data, &mut 0).await?;
let actor_id = ObjectId::new(activity.actor().clone());
// verify and receive activity
}
}
-#[async_trait::async_trait(?Send)]
-pub(crate) trait GetCommunity {
- async fn get_community(
- &self,
- context: &LemmyContext,
- request_counter: &mut i32,
- ) -> Result<ApubCommunity, LemmyError>;
-}
-
impl AnnounceActivity {
pub(crate) fn new(
object: RawAnnouncableActivities,