diff options
author | Julio Capote <jcapote@gmail.com> | 2023-01-08 14:11:14 +0000 |
---|---|---|
committer | Julio Capote <jcapote@gmail.com> | 2023-01-08 14:11:14 +0000 |
commit | ff1d7ddc3f5e386b9c8107456c54ca5f985c7b4b (patch) | |
tree | ed1b17c06e2fce209178719a67ee4f92feeec477 | |
parent | ffae32bca78d82d1cb0afd3e51a2582b0ec1f58d (diff) | |
download | communique-ff1d7ddc3f5e386b9c8107456c54ca5f985c7b4b.tar.gz |
rename last bit of profile to actor
-rw-r--r-- | cgi/servers.go | 2 | ||||
-rw-r--r-- | controller/controller.go | 8 | ||||
-rw-r--r-- | urls/urls.go | 4 | ||||
-rw-r--r-- | views/actor.go | 4 | ||||
-rw-r--r-- | views/helpers.go | 4 | ||||
-rw-r--r-- | views/outbox.go | 2 | ||||
-rw-r--r-- | views/webfinger.go | 2 |
7 files changed, 13 insertions, 13 deletions
diff --git a/cgi/servers.go b/cgi/servers.go index c4bf781..ff067d1 100644 --- a/cgi/servers.go +++ b/cgi/servers.go @@ -158,7 +158,7 @@ func processTick(h config.Handler, output []byte, persister *models.Persister, l joinedUrl := strings.Join(parts[2:], ":") logger.With("payload", jsonData).With("inboxUrl", joinedUrl).Debugf("delivering activity") - actorKeyUrl, err := urls.UrlProfileKey(h.Name, cfg.Domain) + actorKeyUrl, err := urls.UrlActorKey(h.Name, cfg.Domain) if err != nil { logger.Error(err) continue diff --git a/controller/controller.go b/controller/controller.go index e2b21b8..91ac267 100644 --- a/controller/controller.go +++ b/controller/controller.go @@ -177,7 +177,7 @@ func (r *Controller) Following(name string) (map[string]interface{}, error) { if handler == nil { return nil, nil } - profile, err := urls.UrlProfile(name, r.cfg.Domain) + profile, err := urls.UrlActor(name, r.cfg.Domain) if err != nil { return nil, err } @@ -200,7 +200,7 @@ func (r *Controller) Followers(name string) (map[string]interface{}, error) { if handler == nil { return nil, nil } - profile, err := urls.UrlProfile(name, r.cfg.Domain) + profile, err := urls.UrlActor(name, r.cfg.Domain) if err != nil { return nil, err } @@ -248,7 +248,7 @@ func (r *Controller) Inbox(name string, req *http.Request, payload []byte) error return err } - actorUrl, err := urls.UrlProfile(handler.handlerCfg.Name, r.cfg.Domain) + actorUrl, err := urls.UrlActor(handler.handlerCfg.Name, r.cfg.Domain) if err != nil { return err } @@ -261,7 +261,7 @@ func (r *Controller) Inbox(name string, req *http.Request, payload []byte) error inboxUrl := inboxProp.GetIRI() logger.With("actor", idPropUrl).With("inbox", inboxUrl).Debugf("follow") - actorKeyUrl, err := urls.UrlProfileKey(handler.handlerCfg.Name, r.cfg.Domain) + actorKeyUrl, err := urls.UrlActorKey(handler.handlerCfg.Name, r.cfg.Domain) if err != nil { return err } diff --git a/urls/urls.go b/urls/urls.go index 69c3336..c7eddd8 100644 --- a/urls/urls.go +++ b/urls/urls.go @@ -29,11 +29,11 @@ func UrlOutbox(name, domain string) (*url.URL, error) { return linkTo("outbox", domain, "actors", name, "outbox") } -func UrlProfile(name, domain string) (*url.URL, error) { +func UrlActor(name, domain string) (*url.URL, error) { return linkTo("outbox", domain, "actors", name) } -func UrlProfileKey(name, domain string) (*url.URL, error) { +func UrlActorKey(name, domain string) (*url.URL, error) { return linkTo("outbox", domain, "actors", name+"#key") } diff --git a/views/actor.go b/views/actor.go index 36f1f0c..3069dda 100644 --- a/views/actor.go +++ b/views/actor.go @@ -22,12 +22,12 @@ func RenderActor(name, domain, pem, mediaType, summary string) (map[string]inter outboxProp := streams.NewActivityStreamsOutboxProperty() outboxProp.SetIRI(outbox) - actorUrl, err := urls.UrlProfile(name, domain) + actorUrl, err := urls.UrlActor(name, domain) if err != nil { return nil, err } - actorUrlKey, err := urls.UrlProfileKey(name, domain) + actorUrlKey, err := urls.UrlActorKey(name, domain) if err != nil { return nil, err } diff --git a/views/helpers.go b/views/helpers.go index 96c81bc..4d20056 100644 --- a/views/helpers.go +++ b/views/helpers.go @@ -24,7 +24,7 @@ func activityObjectNote(name, domain string, v models.OutboxItem) (vocab.Activit contentProp.AppendXMLSchemaString(string(v.Content)) note.SetActivityStreamsContent(contentProp) - actorUrl, err := urls.UrlProfile(name, domain) + actorUrl, err := urls.UrlActor(name, domain) if err != nil { return nil, err } @@ -81,7 +81,7 @@ func activityObjectCreate(name, domain string, v models.OutboxItem, note vocab.A publishedProp.Set(v.CreatedAt) crea.SetActivityStreamsPublished(publishedProp) - actorUrl, err := urls.UrlProfile(name, domain) + actorUrl, err := urls.UrlActor(name, domain) if err != nil { return nil, err } diff --git a/views/outbox.go b/views/outbox.go index 37afed1..fcdf08e 100644 --- a/views/outbox.go +++ b/views/outbox.go @@ -16,7 +16,7 @@ func RenderOutboxCollection(name, domain string, page []models.OutboxItem) (map[ return nil, err } - actorUrl, err := urls.UrlProfile(name, domain) + actorUrl, err := urls.UrlActor(name, domain) if err != nil { return nil, err } diff --git a/views/webfinger.go b/views/webfinger.go index 47c1223..f500bc0 100644 --- a/views/webfinger.go +++ b/views/webfinger.go @@ -19,7 +19,7 @@ type WebfingerResource struct { } func RenderWebfinger(name, domain, hostname string) (*WebfingerResource, error) { - actorUrl, err := urls.UrlProfile(name, domain) + actorUrl, err := urls.UrlActor(name, domain) if err != nil { return nil, err } |