mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-27 06:03:51 +03:00
use new factory function
This commit is contained in:
parent
e8371ca94c
commit
73a38ea0d1
1 changed files with 2 additions and 3 deletions
|
@ -247,12 +247,11 @@ func RepositoryInbox(ctx *context.APIContext) {
|
||||||
|
|
||||||
// parse senderActorId
|
// parse senderActorId
|
||||||
// senderActorId holds the data to construct the sender of the star
|
// senderActorId holds the data to construct the sender of the star
|
||||||
validatedActorId, err := activitypub.ValidateAndParseIRI(activity.Actor.GetID().String())
|
actorId, err := activitypub.NewPersonId(activity.Actor.GetID().String(), string(activity.Source))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.ServerError("Set Name", err)
|
ctx.ServerError("Validate actorId", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
actorId := activitypub.ParseActorID(validatedActorId, string(activity.Source))
|
|
||||||
|
|
||||||
// Is the PersonId Struct valid?
|
// Is the PersonId Struct valid?
|
||||||
actorId.PanicIfInvalid()
|
actorId.PanicIfInvalid()
|
||||||
|
|
Loading…
Reference in a new issue