[chore/bugfix] Refactor ap/extract.go functions, return URIs more reliably (#1897)

This commit is contained in:
tobi 2023-06-17 17:49:11 +02:00 committed by GitHub
commit d8e16a226a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 613 additions and 428 deletions

View file

@ -239,8 +239,8 @@ func (d *deref) enrichStatus(ctx context.Context, requestUser string, uri *url.U
derefd = true
}
// Get the attributed-to status in order to fetch profile.
attributedTo, err := ap.ExtractAttributedTo(apubStatus)
// Get the attributed-to account in order to fetch profile.
attributedTo, err := ap.ExtractAttributedToURI(apubStatus)
if err != nil {
return nil, nil, gtserror.New("attributedTo was empty")
}