]> Untitled Git - lemmy.git/blobdiff - crates/apub/src/activity_queue.rs
Rewrite activitypub following, person, community, pm (#1692)
[lemmy.git] / crates / apub / src / activity_queue.rs
index c7ff0a81d30aaa01f7a6a53fb048485192e03780..48cccc612d9862ff4b40a556ba9c42483f7637e3 100644 (file)
@@ -31,34 +31,6 @@ use serde::{Deserialize, Serialize};
 use std::{collections::BTreeMap, env, fmt::Debug, future::Future, pin::Pin};
 use url::Url;
 
-/// Sends a local activity to a single, remote actor.
-///
-/// * `activity` the apub activity to be sent
-/// * `creator` the local actor which created the activity
-/// * `inbox` the inbox url where the activity should be delivered to
-pub(crate) async fn send_activity_single_dest<T, Kind>(
-  activity: T,
-  creator: &dyn ActorType,
-  inbox: Url,
-  context: &LemmyContext,
-) -> Result<(), LemmyError>
-where
-  T: AsObject<Kind> + Extends<Kind> + Debug + BaseExt<Kind>,
-  Kind: Serialize,
-  <T as Extends<Kind>>::Error: From<serde_json::Error> + Send + Sync + 'static,
-{
-  if check_is_apub_id_valid(&inbox, false).is_ok() {
-    debug!(
-      "Sending activity {:?} to {}",
-      &activity.id_unchecked().map(ToString::to_string),
-      &inbox
-    );
-    send_activity_internal(context, activity, creator, vec![inbox], true, true).await?;
-  }
-
-  Ok(())
-}
-
 /// From a local community, send activity to all remote followers.
 ///
 /// * `activity` the apub activity to send