]> git.mxchange.org Git - friendica.git/commitdiff
turn dislike activities into plain text comments for FB delivery
authorFriendika <info@friendika.com>
Tue, 17 May 2011 11:53:05 +0000 (04:53 -0700)
committerFriendika <info@friendika.com>
Tue, 17 May 2011 11:53:05 +0000 (04:53 -0700)
addon/facebook/facebook.php

index ebb0c5344f7ad1653de25e40f7d7ae3dd76be386..cf2bfe4343d9de797fa58cfb3587daccfe09bd09 100644 (file)
@@ -474,6 +474,11 @@ function facebook_post_hook(&$a,&$b) {
 
                                // make links readable before we strip the code
 
+                               // unless it's a dislike - just send the text as a comment
+
+                               if($b['verb'] == ACTIVITY_DISLIKE)
+                                       $msg = trim(strip_tags(bbcode($msg)));
+
                                if(preg_match("/\[url=(.+?)\](.+?)\[\/url\]/is",$msg,$matches)) {
 
                                        $link = $matches[1];