Stop private and protected blogs from federating

Fixes #403
This commit is contained in:
Donald Feury 2021-01-27 19:39:46 -05:00
parent 53ea85dc86
commit e6417d911c
1 changed files with 11 additions and 0 deletions

View File

@ -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)