Dont try to send activities if federation is disabled (fixes #2499) (#2500)

This commit is contained in:
Nutomic 2022-10-17 18:29:18 +00:00 committed by GitHub
parent 0a60bcb8ee
commit 74bc1198ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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());