From b5fb81f535b7daba255bc3a9750c89b9adcc5abe Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 17 Oct 2018 01:10:07 -0400 Subject: [PATCH] Add Mastodon/Pleroma protocol guessing --- src/Core/Protocol.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Core/Protocol.php b/src/Core/Protocol.php index d41250a686..949e2350c3 100644 --- a/src/Core/Protocol.php +++ b/src/Core/Protocol.php @@ -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;