Ensure pubkey key is present in APContact::getByUrl result

- Addresses https://github.com/friendica/friendica/issues/8000#issuecomment-568799866
This commit is contained in:
Hypolite Petovan 2019-12-24 15:37:35 -05:00
parent 66e9f0e0da
commit 17c252f3c7
1 changed files with 1 additions and 0 deletions

View File

@ -192,6 +192,7 @@ class APContact extends BaseObject
$apcontact['addr'] = '';
}
$apcontact['pubkey'] = null;
if (!empty($compacted['w3id:publicKey'])) {
$apcontact['pubkey'] = trim(JsonLD::fetchElement($compacted['w3id:publicKey'], 'w3id:publicKeyPem', '@value'));
}