summaryrefslogtreecommitdiffstats
path: root/server/src/apub/post.rs
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/apub/post.rs')
-rw-r--r--server/src/apub/post.rs32
1 files changed, 11 insertions, 21 deletions
diff --git a/server/src/apub/post.rs b/server/src/apub/post.rs
index 255629e8..c4e98f11 100644
--- a/server/src/apub/post.rs
+++ b/server/src/apub/post.rs
@@ -1,31 +1,14 @@
use crate::{
apub::{
activities::{populate_object_props, send_activity_to_community},
- create_apub_response,
- create_apub_tombstone_response,
- create_tombstone,
+ create_apub_response, create_apub_tombstone_response, create_tombstone,
extensions::page_extension::PageExtension,
fetcher::{get_or_fetch_and_upsert_remote_community, get_or_fetch_and_upsert_remote_user},
- get_apub_protocol_string,
- ActorType,
- ApubLikeableType,
- ApubObjectType,
- FromApub,
- PageExt,
- ToApub,
+ ActorType, ApubLikeableType, ApubObjectType, FromApub, PageExt, ToApub,
},
blocking,
- convert_datetime,
- db::{
- community::Community,
- post::{Post, PostForm},
- user::User_,
- Crud,
- },
routes::DbPoolParam,
- DbPool,
- LemmyError,
- Settings,
+ DbPool, LemmyError,
};
use activitystreams::{
activity::{Create, Delete, Dislike, Like, Remove, Undo, Update},
@@ -36,6 +19,13 @@ use activitystreams::{
use activitystreams_ext::Ext1;
use activitystreams_new::object::Tombstone;
use actix_web::{body::Body, client::Client, web, HttpResponse};
+use lemmy_db::{
+ community::Community,
+ post::{Post, PostForm},
+ user::User_,
+ Crud,
+};
+use lemmy_utils::{convert_datetime, get_apub_protocol_string, settings::Settings};
use serde::Deserialize;
#[derive(Deserialize)]
@@ -164,7 +154,7 @@ impl FromApub for PostForm {
/// Parse an ActivityPub page received from another instance into a Lemmy post.
async fn from_apub(
- page: &mut PageExt,
+ page: &PageExt,
client: &Client,
pool: &DbPool,
) -> Result<PostForm, LemmyError> {