Browse Source

Merge pull request #431 from Dak425/stop-federating-protected-and-private-blogs

Stop private and protected blogs from federating
pull/452/head
Matt Baer 3 years ago
committed by GitHub
parent
commit
4228761eb3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions
  1. +11
    -0
      activitypub.go

+ 11
- 0
activitypub.go View File

@@ -662,6 +662,16 @@ func deleteFederatedPost(app *App, p *PublicPost, collID int64) error {
}

func federatePost(app *App, p *PublicPost, collID int64, isUpdate bool) error {
// 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
}

if debugging {
if isUpdate {
log.Info("Federating updated post!")
@@ -669,6 +679,7 @@ func federatePost(app *App, p *PublicPost, collID int64, isUpdate bool) error {
log.Info("Federating new post!")
}
}

actor := p.Collection.PersonObject(collID)
na := p.ActivityObject(app)



Loading…
Cancel
Save