From 9333bbc4d0d5ae46c72fca1f5b1aacb3c0a7653e Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Thu, 23 Jan 2025 17:18:23 +0000 Subject: [feature] Serve bot accounts over AP as Service instead of Person (#3672) * pepis * oopsie doopsie * bollocks --- internal/ap/activitystreams.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'internal/ap/activitystreams.go') 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 -- cgit v1.2.3