Remove unneeded ap.Item()

This commit is contained in:
Anthony Wang 2023-01-01 18:09:58 +00:00
parent a238112529
commit 05d9a6dc1d
No known key found for this signature in database
GPG Key ID: 42A5B952E6DD8D38
1 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ func Follow(actorUser, followUser *user_model.User) *ap.Follow {
Type: ap.FollowType,
Actor: ap.PersonNew(ap.IRI(actorUser.GetIRI())),
Object: ap.PersonNew(ap.IRI(followUser.GetIRI())),
To: ap.ItemCollection{ap.Item(ap.IRI(followUser.GetIRI() + "/inbox"))},
To: ap.ItemCollection{ap.IRI(followUser.GetIRI() + "/inbox")},
}
}
@ -27,7 +27,7 @@ func Unfollow(actorUser, followUser *user_model.User) *ap.Undo {
Type: ap.UndoType,
Actor: ap.PersonNew(ap.IRI(actorUser.GetIRI())),
Object: Follow(actorUser, followUser),
To: ap.ItemCollection{ap.Item(ap.IRI(followUser.GetIRI() + "/inbox"))},
To: ap.ItemCollection{ap.IRI(followUser.GetIRI() + "/inbox")},
}
}
@ -57,6 +57,6 @@ func Create(user *user_model.User, object ap.ObjectOrLink, to string) *ap.Create
Type: ap.CreateType,
Actor: ap.PersonNew(ap.IRI(user.GetIRI())),
Object: object,
To: ap.ItemCollection{ap.Item(ap.IRI(to + "/inbox"))},
To: ap.ItemCollection{ap.IRI(to + "/inbox")},
}
}