]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Protocol.php
coding standards
[friendica.git] / src / Core / Protocol.php
index 9e96b7db2f604e2d90b8c1c2a51eaf6c0bb3db8c..949e2350c3be85ceb72f93d0ad756cb8d2936b84 100644 (file)
@@ -9,7 +9,7 @@ use Friendica\Util\Network;
 /**
  * Manage compatibility with federated networks
  *
- * @author Hypolite Petovan <mrpetovan@gmail.com>
+ * @author Hypolite Petovan <hypolite@mrpetovan.com>
  */
 class Protocol
 {
@@ -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;