From d2cd5b33531a9b4f1006641cd21572915e1c43d6 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 30 Mar 2011 11:22:32 -0700 Subject: [PATCH] Tweak which should fix ActivityStreams output for Twitter profiles (if remote_profile entries didn't match, we ended up losing id/URI). Explicitly uses the Twitter profile URL as profile URI if matching, without having to check the db. --- plugins/TwitterBridge/TwitterBridgePlugin.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins/TwitterBridge/TwitterBridgePlugin.php b/plugins/TwitterBridge/TwitterBridgePlugin.php index b6658b13a6..29192cf53b 100644 --- a/plugins/TwitterBridge/TwitterBridgePlugin.php +++ b/plugins/TwitterBridge/TwitterBridgePlugin.php @@ -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; + } } -- 2.39.5