diff options
-rw-r--r-- | views/outbox.go | 14 | ||||
-rw-r--r-- | views/webfinger.go | 2 |
2 files changed, 11 insertions, 5 deletions
diff --git a/views/outbox.go b/views/outbox.go index c2b8015..6132072 100644 --- a/views/outbox.go +++ b/views/outbox.go @@ -16,10 +16,14 @@ func RenderOutboxCollection(name, domain string, page []models.OutboxItem) (map[ return nil, err } - // partOf, err := urls.UrlOutbox(name, domain) - // if err != nil { - // return nil, err - // } + actorUrl, err := urls.UrlProfile(name, domain) + if err != nil { + return nil, err + } + + attrProp := streams.NewActivityStreamsAttributedToProperty() + attrProp.AppendIRI(actorUrl) + publicUrl, err := url.Parse("https://www.w3.org/ns/activitystreams#Public") if err != nil { return nil, err @@ -33,6 +37,8 @@ func RenderOutboxCollection(name, domain string, page []models.OutboxItem) (map[ idProp.Set(id) oc.SetJSONLDId(idProp) + oc.SetActivityStreamsAttributedTo(attrProp) + itemsProp := streams.NewActivityStreamsOrderedItemsProperty() for _, v := range page { diff --git a/views/webfinger.go b/views/webfinger.go index 5af6308..e6ddc23 100644 --- a/views/webfinger.go +++ b/views/webfinger.go @@ -25,7 +25,7 @@ func RenderWebfinger(name, domain, hostname string) (*WebfingerResource, error) } rs := WebfingerResource{ Subject: fmt.Sprintf("acct:%s%s", name, hostname), //hostname contains @ - Aliases: []string{}, + Aliases: []string{actorUrl.String()}, Links: []Link{{ Rel: "self", Href: actorUrl.String(), |