aboutsummaryrefslogtreecommitdiff
path: root/views/outbox.go
diff options
context:
space:
mode:
authorJulio Capote <jcapote@gmail.com>2023-01-02 18:33:19 +0000
committerJulio Capote <jcapote@gmail.com>2023-01-02 18:33:19 +0000
commit5d64d6ac469dc6e92792121cab0f102cebb8670f (patch)
treec7cb13a0454c16cf2d0621f6e546abb70dfe0cbe /views/outbox.go
parent4f42b00ec18cfdf3f97527a6fe91babc03f118aa (diff)
downloadcommunique-5d64d6ac469dc6e92792121cab0f102cebb8670f.tar.gz
add webfinger alias for actor profile page and add attributedTo to outbox
Diffstat (limited to '')
-rw-r--r--views/outbox.go14
1 files changed, 10 insertions, 4 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 {