]> Untitled Git - lemmy.git/commitdiff
Dont try to send activities if federation is disabled (fixes #2499) (#2500)
authorNutomic <me@nutomic.com>
Mon, 17 Oct 2022 18:29:18 +0000 (18:29 +0000)
committerGitHub <noreply@github.com>
Mon, 17 Oct 2022 18:29:18 +0000 (14:29 -0400)
crates/apub/src/activities/mod.rs

index d3400705dff5fc439e422d0416ed1fbc709c7adb..8205967f72ddf13e8de4c5a8dc602a946d6ddb39 100644 (file)
@@ -167,6 +167,9 @@ where
   ActorT: Actor + ActorType,
   Activity: ActivityHandler<Error = LemmyError>,
 {
+  if !context.settings().federation.enabled {
+    return Ok(());
+  }
   info!("Sending activity {}", activity.id().to_string());
   let activity = WithContext::new(activity, CONTEXT.deref().clone());