]> git.mxchange.org Git - friendica-addons.git/commitdiff
Libertree: Now the title is included in the message as well
authorMichael Vogel <icarus@dabo.de>
Sun, 17 Jun 2012 18:35:20 +0000 (20:35 +0200)
committerMichael Vogel <icarus@dabo.de>
Sun, 17 Jun 2012 18:35:20 +0000 (20:35 +0200)
libertree/libertree.php

index 4f0c814d2d1067f2ddb6c021c89cbfde46a289be..f57c773b394588c05730a90854ab93d95d53c848 100755 (executable)
@@ -167,16 +167,21 @@ function libertree_send(&$a,&$b) {
                        }
                }
                if(count($tag_arr))
-                       $tags = implode(',',$tag_arr);          
+                       $tags = implode(',',$tag_arr);
 
+               $title = $b['title'];
+               $body = $b['body'];
+
+               if(strlen($title))
+                       $body = "[b]".html_entity_decode($title)."[/b]\n\n".$body;
 
                $params = array(
-                       'text' => bb2diaspora($b['body'])
+                       'text' => bb2diaspora($body)
                //      'token' => $ltree_api_token
                );
 
                $result = post_url($ltree_blog,$params);
-               logger('libertree: ' . $result);        
+               logger('libertree: ' . $result);
 
        }
 }