diff options
author | Zach Copley <zach@controlyourself.ca> | 2008-09-26 15:05:43 -0400 |
---|---|---|
committer | Zach Copley <zach@controlyourself.ca> | 2008-09-26 15:05:43 -0400 |
commit | 654f9b8c97b40537d1c15bea5f779c4a857b39e0 (patch) | |
tree | 786914915eaa8fb162a47605896778c0bab61bdc /lib | |
parent | 7b0382fd5b67a0f76d7111face2b2a4910df32e2 (diff) |
Twitter bridge -- more explicit checking of noticesync bits
darcs-hash:20080926190543-7b5ce-b67b1f2a27825a38782ea8a7a11cc5f50e49725a.gz
Diffstat (limited to 'lib')
-rw-r--r-- | lib/util.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/util.php b/lib/util.php index cf514564e..1e58fda09 100644 --- a/lib/util.php +++ b/lib/util.php @@ -1115,13 +1115,13 @@ function common_broadcast_notice($notice, $remote=false) { // Check to see if notice should go to Twitter $flink = Foreign_link::getForeignLink($notice->profile_id, 1); // 1 == Twitter - if ($flink->noticesync & FOREIGN_NOTICE_SEND) { - + if (($flink->noticesync & FOREIGN_NOTICE_SEND) == FOREIGN_NOTICE_SEND) { + // If it's not a Twitter-style reply, or if the user WANTS to send replies... - + if (!preg_match('/^@[a-zA-Z0-9_]{1,15}\b/', $notice->content) || - ($flink->noticesync & FOREIGN_NOTICE_SEND_REPLY)) { - + (($flink->noticesync & FOREIGN_NOTICE_SEND) == FOREIGN_NOTICE_SEND)) { + $result = common_twitter_broadcast($notice, $flink); if (!$result) { |