+pub async fn match_outgoing_activities(
+ data: SendActivityData,
+ context: &Data<LemmyContext>,
+) -> LemmyResult<()> {
+ let fed_task = match data {
+ SendActivityData::CreatePost(post) => {
+ let creator_id = post.creator_id;
+ CreateOrUpdatePage::send(
+ post,
+ creator_id,
+ CreateOrUpdateType::Create,
+ context.reset_request_count(),
+ )
+ }
+ };
+ if *SYNCHRONOUS_FEDERATION {
+ fed_task.await?;
+ } else {
+ spawn_try_task(fed_task);
+ }