use http::StatusCode;
use lemmy_api_common::context::LemmyContext;
use lemmy_db_schema::source::activity::Activity;
-use lemmy_utils::error::{LemmyError, LemmyResult};
+use lemmy_utils::error::{LemmyError, LemmyErrorType, LemmyResult};
use serde::{Deserialize, Serialize};
use std::ops::Deref;
use url::Url;
}
fn err_object_not_local() -> LemmyError {
- LemmyError::from_message("Object not local, fetch it from original instance")
+ LemmyErrorType::ObjectNotLocal.into()
}
#[derive(Deserialize)]
info.id
))?
.into();
- let activity = Activity::read_from_apub_id(context.pool(), &activity_id).await?;
+ let activity = Activity::read_from_apub_id(&mut context.pool(), &activity_id).await?;
let sensitive = activity.sensitive;
if !activity.local {