]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Tweak which should fix ActivityStreams output for Twitter profiles (if remote_profile...
authorBrion Vibber <brion@pobox.com>
Wed, 30 Mar 2011 18:22:32 +0000 (11:22 -0700)
committerBrion Vibber <brion@pobox.com>
Wed, 30 Mar 2011 18:22:32 +0000 (11:22 -0700)
Explicitly uses the Twitter profile URL as profile URI if matching, without having to check the db.

plugins/TwitterBridge/TwitterBridgePlugin.php

index b6658b13a6f2c15d9caabde1ccdc8bc0dd3fe225..29192cf53b05c8853ac87b8135153a5c5990e422 100644 (file)
@@ -530,4 +530,13 @@ class TwitterBridgePlugin extends Plugin
 
         return true;
     }
+
+    function onStartGetProfileUri($profile, &$uri)
+    {
+        if (preg_match('!^https?://twitter.com/!', $profile->profileurl)) {
+            $uri = $profile->profileurl;
+            return false;
+        }
+        return true;
+    }
 }