Use GetIRI() instead of OriginalURL for fetching repo IRI
This commit is contained in:
parent
d475724cc5
commit
a238112529
|
@ -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))},
|
||||
To: ap.ItemCollection{ap.Item(ap.IRI(to + "/inbox"))},
|
||||
}
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ func CreateIssueComment(ctx context.Context, doer *user_model.User, repo *repo_m
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
create := activitypub.Create(doer, note, repo.OriginalURL+"/inbox")
|
||||
create := activitypub.Create(doer, note, repo.GetIRI())
|
||||
err = activitypub.Send(doer, create)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
@ -33,8 +33,11 @@ func NewIssue(repo *repo_model.Repository, issue *issues_model.Issue, labelIDs [
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
issue.LoadPoster(db.DefaultContext)
|
||||
create := activitypub.Create(issue.Poster, ticket, repo.OriginalURL+"/inbox")
|
||||
err = issue.LoadPoster(db.DefaultContext)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
create := activitypub.Create(issue.Poster, ticket, repo.GetIRI())
|
||||
err = activitypub.Send(issue.Poster, create)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Reference in New Issue