瀏覽代碼

Moved guard clauses to stop federation before debug logging

pull/431/head
Donald Feury 3 年之前
父節點
當前提交
68297acb74
共有 1 個檔案被更改,包括 8 行新增8 行删除
  1. +8
    -8
      activitypub.go

+ 8
- 8
activitypub.go 查看文件

@@ -624,14 +624,6 @@ func deleteFederatedPost(app *App, p *PublicPost, collID int64) 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.cfg.App.Private {
return nil
@@ -642,6 +634,14 @@ func federatePost(app *App, p *PublicPost, collID int64, isUpdate bool) error {
return nil
}

if debugging {
if isUpdate {
log.Info("Federating updated post!")
} else {
log.Info("Federating new post!")
}
}

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



Loading…
取消
儲存