diff options
author | 2025-01-23 17:18:23 +0000 | |
---|---|---|
committer | 2025-01-23 18:18:23 +0100 | |
commit | 9333bbc4d0d5ae46c72fca1f5b1aacb3c0a7653e (patch) | |
tree | e7ccd1dc3abff5386e0b86e6baf659c9aa3b55a5 /internal/ap/activitystreams.go | |
parent | [feature] Add warning about `trusted-proxies` to make config easier (#3675) (diff) | |
download | gotosocial-9333bbc4d0d5ae46c72fca1f5b1aacb3c0a7653e.tar.xz |
[feature] Serve bot accounts over AP as Service instead of Person (#3672)
* pepis
* oopsie doopsie
* bollocks
Diffstat (limited to 'internal/ap/activitystreams.go')
-rw-r--r-- | internal/ap/activitystreams.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/internal/ap/activitystreams.go b/internal/ap/activitystreams.go index 8c53ae501..50955ce2c 100644 --- a/internal/ap/activitystreams.go +++ b/internal/ap/activitystreams.go @@ -17,6 +17,22 @@ package ap +import ( + "net/url" + + "github.com/superseriousbusiness/activity/pub" +) + +// PublicURI returns a fresh copy of the *url.URL version of the +// magic ActivityPub URI https://www.w3.org/ns/activitystreams#Public +func PublicURI() *url.URL { + publicURI, err := url.Parse(pub.PublicActivityPubIRI) + if err != nil { + panic(err) + } + return publicURI +} + // https://www.w3.org/TR/activitystreams-vocabulary const ( ActivityAccept = "Accept" // ActivityStreamsAccept https://www.w3.org/TR/activitystreams-vocabulary/#dfn-accept |