]> git.mxchange.org Git - friendica.git/commitdiff
Probing now has a Twitter detection.
authorMichael Vogel <icarus@dabo.de>
Fri, 8 Jul 2016 19:15:20 +0000 (21:15 +0200)
committerMichael Vogel <icarus@dabo.de>
Fri, 8 Jul 2016 19:15:20 +0000 (21:15 +0200)
include/Probe.php

index 9dc2a370b9e77098eaa9c807f24e05e73093d69d..0ce388dd7b45c86e9e9ad7ddae547cc0e3a25b82 100644 (file)
@@ -197,6 +197,9 @@ class Probe {
                        $host = substr($uri,strpos($uri, '@') + 1);
                        $nick = substr($uri,0, strpos($uri, '@'));
 
+                       if (strpos($uri, '@twitter.com'))
+                               return array("network" => NETWORK_TWITTER);
+
                        $lrdd = self::xrd($host);
                        if (!$lrdd)
                                return self::mail($uri, $uid);
@@ -211,6 +214,10 @@ class Probe {
 
                        // todo: Ports?
                        $host = $parts["host"];
+
+                       if ($host == 'twitter.com')
+                               return array("network" => NETWORK_TWITTER);
+
                        $lrdd = self::xrd($host);
 
                        $path_parts = explode("/", trim($parts["path"], "/"));