[chore] Try to parse public key as both Actor + bare key (#2710)

* [chore] Try to parse public key as both Actor + bare key

* fix weird test fail
This commit is contained in:
tobi 2024-04-02 12:30:10 +02:00 committed by GitHub
commit 4bbdef02f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 217 additions and 75 deletions

View file

@ -211,7 +211,7 @@ func (c *Converter) ASRepresentationToAccount(ctx context.Context, accountable a
}
// Extract account public key and verify ownership to account.
pkey, pkeyURL, pkeyOwnerID, err := ap.ExtractPublicKey(accountable)
pkey, pkeyURL, pkeyOwnerID, err := ap.ExtractPubKeyFromActor(accountable)
if err != nil {
err := gtserror.Newf("error extracting public key for %s: %w", uri, err)
return nil, gtserror.SetMalformed(err)