From 73a38ea0d1c2423fb67579071a703e8eeda09e20 Mon Sep 17 00:00:00 2001 From: Michael Jerger Date: Fri, 8 Dec 2023 19:52:09 +0100 Subject: [PATCH] use new factory function --- routers/api/v1/activitypub/repository.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/routers/api/v1/activitypub/repository.go b/routers/api/v1/activitypub/repository.go index 867dabeb2f..ca1b5386e4 100644 --- a/routers/api/v1/activitypub/repository.go +++ b/routers/api/v1/activitypub/repository.go @@ -247,12 +247,11 @@ func RepositoryInbox(ctx *context.APIContext) { // parse senderActorId // senderActorId holds the data to construct the sender of the star - validatedActorId, err := activitypub.ValidateAndParseIRI(activity.Actor.GetID().String()) + actorId, err := activitypub.NewPersonId(activity.Actor.GetID().String(), string(activity.Source)) if err != nil { - ctx.ServerError("Set Name", err) + ctx.ServerError("Validate actorId", err) return } - actorId := activitypub.ParseActorID(validatedActorId, string(activity.Source)) // Is the PersonId Struct valid? actorId.PanicIfInvalid()