]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
change the rule for detecting replies.
authorEvan Prodromou <evan@controlyourself.ca>
Wed, 24 Sep 2008 20:07:10 +0000 (16:07 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Wed, 24 Sep 2008 20:07:10 +0000 (16:07 -0400)
darcs-hash:20080924200710-5ed1f-be75fac6babb59469a1967436c32f0d8c8271680.gz

lib/util.php

index 901e3ac4662633c26b79c0850e6847a82ff7933b..e663eb861c41b41bbd6f0d53ef70c8007c4f4fd1 100644 (file)
@@ -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);