mv our actor code to forgefed

This commit is contained in:
Michael Jerger 2023-12-09 14:53:40 +01:00
parent abdf56dde1
commit 1fe35e14a5
3 changed files with 4 additions and 4 deletions

View file

@ -1,7 +1,7 @@
// Copyright 2023 The forgejo Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package activitypub
package forgefed
import (
"fmt"
@ -94,6 +94,7 @@ func (value PersonId) Validate() []string {
return result
}
// TODO: Move valid-parts to valid package
/*
IsValid concatenates the error messages with newlines and returns them if there are any
*/

View file

@ -1,7 +1,7 @@
// Copyright 2023 The forgejo Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package activitypub
package forgefed
import (
"testing"

View file

@ -11,7 +11,6 @@ import (
"strings"
"time"
"code.gitea.io/gitea/models/activitypub"
"code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/models/forgefed"
repo_model "code.gitea.io/gitea/models/repo"
@ -239,7 +238,7 @@ func RepositoryInbox(ctx *context.APIContext) {
log.Info("RepositoryInbox: Activity.Source: %v, Activity.Actor %v, Activity.Actor.Id %v", activity.Source, activity.Actor, activity.Actor.GetID().String())
// parse actorId
actorId, err := activitypub.NewPersonId(activity.Actor.GetID().String(), string(activity.Source))
actorId, err := forgefed.NewPersonId(activity.Actor.GetID().String(), string(activity.Source))
if err != nil {
ctx.ServerError("Validate actorId", err)
return