diff --git a/integrations/api_activitypub_person_test.go b/integrations/api_activitypub_person_test.go index 818793d4a4..024e024066 100644 --- a/integrations/api_activitypub_person_test.go +++ b/integrations/api_activitypub_person_test.go @@ -39,7 +39,7 @@ func TestActivityPubPerson(t *testing.T) { err := person.UnmarshalJSON(body) assert.NoError(t, err) - assert.Equal(t, ap.ActivityVocabularyType("Person"), person.Type) + assert.Equal(t, ap.PersonType, person.Type) assert.Equal(t, username, person.Name.String()) keyID := person.GetID().String() assert.Regexp(t, fmt.Sprintf("activitypub/user/%s$", username), keyID) diff --git a/routers/api/v1/activitypub/person.go b/routers/api/v1/activitypub/person.go index a6a8b7a20e..ced0955236 100644 --- a/routers/api/v1/activitypub/person.go +++ b/routers/api/v1/activitypub/person.go @@ -51,8 +51,8 @@ func Person(ctx *context.APIContext) { } person.Name = name - person.Inbox = ap.Item(ap.IRI(link + "/inbox")) - person.Outbox = ap.Item(ap.IRI(link + "/outbox")) + ap.Inbox.AddTo(person) + ap.Outbox.AddTo(person) person.PublicKey.ID = ap.IRI(link + "#main-key") person.PublicKey.Owner = ap.IRI(link)