Stop private and protected blogs from federating

Fixes #403
pull/431/head
Donald Feury 4 years ago
parent 53ea85dc86
commit e6417d911c
  1. 11
      activitypub.go

@ -631,6 +631,17 @@ func federatePost(app *App, p *PublicPost, collID int64, isUpdate bool) error {
log.Info("Federating new post!")
}
}
// If app is private, do not federate
if app.cfg.App.Private {
return nil
}
// Do not federate posts from private or protected blogs
if p.Collection.Visibility == CollPrivate || p.Collection.Visibility == CollProtected {
return nil
}
actor := p.Collection.PersonObject(collID)
na := p.ActivityObject(app)

Loading…
Cancel
Save