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

pull/2501/head
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
1 changed files with 3 additions and 0 deletions

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