summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/twitter.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/twitter.php b/lib/twitter.php
index 7546ffa98..4fff58fd2 100644
--- a/lib/twitter.php
+++ b/lib/twitter.php
@@ -160,6 +160,9 @@ function broadcast_twitter($notice)
// XXX: Hack to get around PHP cURL's use of @ being a a meta character
$statustxt = preg_replace('/^@/', ' @', $notice->content);
+ // Convert !groups to #hashes
+ $statustxt = preg_replace('/(^|\s)!([A-Za-z0-9]{1,64})/', "\\1#\\2", $statustxt);
+
$token = TwitterOAuthClient::unpackToken($flink->credentials);
$client = new TwitterOAuthClient($token->key, $token->secret);