Moved guard clauses to stop federation before debug logging
This commit is contained in:
parent
e6417d911c
commit
68297acb74
|
@ -624,14 +624,6 @@ func deleteFederatedPost(app *App, p *PublicPost, collID int64) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func federatePost(app *App, p *PublicPost, collID int64, isUpdate bool) error {
|
func federatePost(app *App, p *PublicPost, collID int64, isUpdate bool) error {
|
||||||
if debugging {
|
|
||||||
if isUpdate {
|
|
||||||
log.Info("Federating updated post!")
|
|
||||||
} else {
|
|
||||||
log.Info("Federating new post!")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// If app is private, do not federate
|
// If app is private, do not federate
|
||||||
if app.cfg.App.Private {
|
if app.cfg.App.Private {
|
||||||
return nil
|
return nil
|
||||||
|
@ -642,6 +634,14 @@ func federatePost(app *App, p *PublicPost, collID int64, isUpdate bool) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if debugging {
|
||||||
|
if isUpdate {
|
||||||
|
log.Info("Federating updated post!")
|
||||||
|
} else {
|
||||||
|
log.Info("Federating new post!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
actor := p.Collection.PersonObject(collID)
|
actor := p.Collection.PersonObject(collID)
|
||||||
na := p.ActivityObject(app)
|
na := p.ActivityObject(app)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue