aboutsummaryrefslogtreecommitdiff
path: root/urls
diff options
context:
space:
mode:
Diffstat (limited to 'urls')
-rw-r--r--urls/urls.go17
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 {