ActivityPub: The other instances actually cannot find the profiles, so i fixed that

This commit is contained in:
veselcraft 2021-12-28 14:19:49 +03:00
parent 12fc156113
commit 44f981909a
No known key found for this signature in database
GPG key ID: AED66BC1AC628A4E

View file

@ -265,7 +265,8 @@ abstract class OpenVKPresenter extends SimplePresenter
function isActivityPubClient(): bool function isActivityPubClient(): bool
{ {
return $_SERVER['HTTP_ACCEPT'] == 'application/activity+json'; $accept = explode(";", $_SERVER['HTTP_ACCEPT']);
return (bool) preg_match("/(application\/(ld\+json|activity\+json))/gm", $accept[0]);
} }
function getPersonContext() function getPersonContext()