diff options
Diffstat (limited to 'urls/urls.go')
-rw-r--r-- | urls/urls.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/urls/urls.go b/urls/urls.go index 5f563a7..3c08e07 100644 --- a/urls/urls.go +++ b/urls/urls.go @@ -22,6 +22,23 @@ func UrlOutbox(name, domain string) (*url.URL, error) { return u, nil } +func UrlActivity(name, domain, id string) (*url.URL, error) { + u, err := url.Parse(path.Join(domain, "actors", name, "outbox", id, "activity")) + if err != nil { + panic(err) + return nil, fmt.Errorf("could not build activity url: %w", err) + } + return u, nil +} + +func UrlNote(name, domain, id string) (*url.URL, error) { + u, err := url.Parse(path.Join("https://", domain, "actors", name, "outbox", id, "note")) + if err != nil { + return nil, fmt.Errorf("could not build note url: %w", err) + } + return u, nil +} + func UrlOutboxPage(name, domain string) (*url.URL, error) { u, err := UrlOutbox(name, domain) if err != nil { |