From: Michael Date: Fri, 15 Dec 2023 11:19:11 +0000 (+0000) Subject: Added server detection for "threads" X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=303c9fb23f29a0a9a3330daaea6945fc45778955;p=friendica.git Added server detection for "threads" --- diff --git a/src/Model/GServer.php b/src/Model/GServer.php index 9d913f1c12..e00facde18 100644 --- a/src/Model/GServer.php +++ b/src/Model/GServer.php @@ -82,6 +82,7 @@ class GServer const DETECT_STATUS_PHP = 17; // Nextcloud const DETECT_V1_CONFIG = 18; const DETECT_SYSTEM_ACTOR = 20; // Mistpark, Osada, Roadhouse, Zap + const DETECT_THREADS = 21; // Standardized endpoints const DETECT_STATISTICS_JSON = 100; @@ -671,6 +672,12 @@ class GServer return false; } + if (in_array($url, ['https://www.threads.net', 'https://threads.net'])) { + $serverdata['detection-method'] = self::DETECT_THREADS; + $serverdata['network'] = Protocol::ACTIVITYPUB; + $serverdata['platform'] = 'threads'; + } + if (($serverdata['network'] == Protocol::PHANTOM) || in_array($serverdata['detection-method'], self::DETECT_UNSPECIFIC)) { $serverdata = self::detectMastodonAlikes($url, $serverdata); }