From c0f1681fa3a939be6fcf789c06687b837a673803 Mon Sep 17 00:00:00 2001 From: erik Date: Wed, 6 Dec 2023 15:16:01 +0100 Subject: [PATCH] Allow parsing of repository-id too --- models/activitypub/actor.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/models/activitypub/actor.go b/models/activitypub/actor.go index d333c2ee86..18152dac63 100644 --- a/models/activitypub/actor.go +++ b/models/activitypub/actor.go @@ -53,8 +53,9 @@ func (a ActorID) Validate() []string { switch a.source { case "forgejo", "gitea": - if !strings.Contains(a.path, "api/v1/activitypub/user-id") { - err = append(err, fmt.Errorf("the Path to the API was invalid: %v", a.path).Error()) + if !strings.Contains(a.path, "api/v1/activitypub/user-id") && + !strings.Contains(a.path, "api/v1/activitypub/repository-id") { + err = append(err, fmt.Errorf("the Path to the API was invalid: ---%v---", a.path).Error()) } default: err = append(err, fmt.Errorf("currently only forgeo and gitea sources are allowed from actor id").Error())