summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2008-09-24 16:07:10 -0400
committerEvan Prodromou <evan@controlyourself.ca>2008-09-24 16:07:10 -0400
commit59682f24d069caa1d46c2277ac9c7417332c6e60 (patch)
tree0c709c94a2d80cc8d2ef9fddfac286fa6a69e751 /lib/util.php
parentf112b4e1fdd6e276dbd83f1ff8b30817be7b77b6 (diff)
change the rule for detecting replies.
darcs-hash:20080924200710-5ed1f-be75fac6babb59469a1967436c32f0d8c8271680.gz
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/util.php b/lib/util.php
index 901e3ac46..e663eb861 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -1112,9 +1112,10 @@ function common_broadcast_notice($notice, $remote=false) {
$flink = Foreign_link::getForeignLink($notice->profile_id, 1); // 1 == Twitter
if ($flink->noticesync & FOREIGN_NOTICE_SEND) {
- // If it's not a reply, or if the user WANTS to send replies...
+ // If it's not a Twitter-style reply, or if the user WANTS to send replies...
- if (!$notice->reply_to || ($flink->noticesync & FOREIGN_NOTICE_SEND_REPLY)) {
+ if (!preg_match('/^@[a-zA-Z0-9_]{1,15}\b/', $notice->content) ||
+ ($flink->noticesync & FOREIGN_NOTICE_SEND_REPLY)) {
$result = common_twitter_broadcast($notice, $flink);