瀏覽代碼

Use Accept ID on blog's origin

instead of the requesting user's. This closes #16
pull/29/head
Matt Baer 5 年之前
父節點
當前提交
3595c8163c
共有 1 個檔案被更改,包括 4 行新增2 行删除
  1. +4
    -2
      activitypub.go

+ 4
- 2
activitypub.go 查看文件

@@ -12,6 +12,7 @@ import (
"github.com/writeas/activity/streams"
"github.com/writeas/httpsig"
"github.com/writeas/impart"
"github.com/writeas/nerds/store"
"github.com/writeas/web-core/activitypub"
"github.com/writeas/web-core/activitystreams"
"github.com/writeas/web-core/log"
@@ -259,9 +260,10 @@ func handleFetchCollectionInbox(app *app, w http.ResponseWriter, r *http.Request
if followID == nil {
log.Error("Didn't resolve follow ID")
} else {
acceptID, err := url.Parse(followID.String() + "#accept")
aID := c.FederatedAccount() + "#accept-" + store.GenerateFriendlyRandomString(20)
acceptID, err := url.Parse(aID)
if err != nil {
log.Error("Couldn't parse generated Accept URL '%s': %v", followID.String()+"#accept", err)
log.Error("Couldn't parse generated Accept URL '%s': %v", aID, err)
}
a.SetId(acceptID)
}


Loading…
取消
儲存