mv our actor code to forgefed
This commit is contained in:
parent
abdf56dde1
commit
1fe35e14a5
|
@ -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
|
||||
*/
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright 2023 The forgejo Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package activitypub
|
||||
package forgefed
|
||||
|
||||
import (
|
||||
"testing"
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue