mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-10-17 06:28:22 +00:00
fixed circular dependencies
next: fix post call error
This commit is contained in:
parent
7f0371056e
commit
bbe5096307
3 changed files with 27 additions and 25 deletions
|
@ -6,7 +6,6 @@ package forgefed
|
|||
import (
|
||||
"time"
|
||||
|
||||
"code.gitea.io/gitea/modules/context"
|
||||
"code.gitea.io/gitea/modules/validation"
|
||||
|
||||
ap "github.com/go-ap/activitypub"
|
||||
|
@ -20,10 +19,8 @@ type ForgeLike struct {
|
|||
}
|
||||
|
||||
// TODO: Use explicit values instead of ctx !!
|
||||
func NewForgeLike(ctx *context.APIContext) (ForgeLike, error) {
|
||||
func NewForgeLike(actorIRI string, objectIRI string) (ForgeLike, error) {
|
||||
result := ForgeLike{}
|
||||
actorIRI := ctx.Repo.Owner.APAPIURL()
|
||||
objectIRI := ctx.Repo.Repository.APAPIURL()
|
||||
result.Type = ap.LikeType
|
||||
// ToDo: Would validating the source by Actor.Type field make sense?
|
||||
result.Actor = ap.ActorNew(ap.IRI(actorIRI), "ForgejoUser") // Thats us, a User
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue