Browse Source

Add Mastodon/Pleroma protocol guessing

pull/5942/head
Hypolite Petovan 2 years ago
parent
commit
b5fb81f535
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      src/Core/Protocol.php

+ 7
- 0
src/Core/Protocol.php 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;


Loading…
Cancel
Save