mirror of
1
Fork 0

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