]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Twitter bridge: Hack to get around PHP cURL's use of @ as a metachar,
authorZach Copley <zach@controlyourself.ca>
Tue, 23 Sep 2008 08:36:32 +0000 (04:36 -0400)
committerZach Copley <zach@controlyourself.ca>
Tue, 23 Sep 2008 08:36:32 +0000 (04:36 -0400)
which was keeping @reply messages from getting posted to Twitter.

darcs-hash:20080923083632-7b5ce-02498acc9fba3070b984eb473ec7825a5eaa2a77.gz

lib/util.php

index 453149305a400d6d8f67c126eb828ea3df6bc905..86b2747dcb262f07820c069bbd741bf55cc5cc43 100644 (file)
@@ -1129,7 +1129,9 @@ function common_twitter_broadcast($notice, $flink) {
        $twitter_user = $fuser->nickname;
        $twitter_password = $flink->credentials;
        $uri = 'http://www.twitter.com/statuses/update.json';
-       $statustxt = $notice->content;
+       
+       // XXX: Hack to get around PHP cURL's use of @ being a a meta character
+       $statustxt = preg_replace('/^@/', ' @', $notice->content);
        
        $options = array(
                CURLOPT_USERPWD                 => "$twitter_user:$twitter_password",