Add Mastodon/Pleroma protocol guessing

This commit is contained in:
Hypolite Petovan 2018-10-17 01:10:07 -04:00
parent ff643c4b6a
commit b5fb81f535

View File

@ -108,6 +108,13 @@ class Protocol
}
}
// Mastodon, Pleroma
if (preg_match('=https?://(.+?)/users/(.+)=ism', $profile_url, $matches)
|| preg_match('=https?://(.+?)/@(.+)=ism', $profile_url, $matches)
) {
return self::ACTIVITYPUB;
}
// pumpio (http://host.name/user)
if (preg_match('=https?://([\.\w]+)/([\.\w]+)$=ism', $profile_url, $matches)) {
return self::PUMPIO;