mirror of
https://github.com/LemmyNet/activitypub-federation-rust.git
synced 2024-06-13 02:39:28 +00:00
remove fn
This commit is contained in:
parent
6d12adac32
commit
c428a515bc
|
@ -113,14 +113,6 @@ impl SendActivityTask {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn serialize_activity<Activity: Serialize + Debug>(
|
|
||||||
activity: &Activity,
|
|
||||||
) -> Result<Bytes, Error> {
|
|
||||||
Ok(serde_json::to_vec(activity)
|
|
||||||
.map_err(|e| Error::SerializeOutgoingActivity(e, format!("{:?}", activity)))?
|
|
||||||
.into())
|
|
||||||
}
|
|
||||||
|
|
||||||
pub(crate) async fn build_tasks<'a, Activity, Datatype, ActorType>(
|
pub(crate) async fn build_tasks<'a, Activity, Datatype, ActorType>(
|
||||||
activity: &'a Activity,
|
activity: &'a Activity,
|
||||||
actor: &ActorType,
|
actor: &ActorType,
|
||||||
|
@ -135,7 +127,9 @@ where
|
||||||
let config = &data.config;
|
let config = &data.config;
|
||||||
let actor_id = activity.actor();
|
let actor_id = activity.actor();
|
||||||
let activity_id = activity.id();
|
let activity_id = activity.id();
|
||||||
let activity_serialized = serialize_activity(activity)?;
|
let activity_serialized: Bytes = serde_json::to_vec(activity)
|
||||||
|
.map_err(|e| Error::SerializeOutgoingActivity(e, format!("{:?}", activity)))?
|
||||||
|
.into();
|
||||||
let private_key = get_pkey_cached(data, actor).await?;
|
let private_key = get_pkey_cached(data, actor).await?;
|
||||||
|
|
||||||
Ok(futures::stream::iter(
|
Ok(futures::stream::iter(
|
||||||
|
|
Loading…
Reference in a new issue