]> git.mxchange.org Git - friendica.git/blobdiff - addon/statusnet/statusnet.php
infrastructure for personalised @ tags (no UI/settings form yet), allow own comments...
[friendica.git] / addon / statusnet / statusnet.php
index f8e9992e4d81f46e349f924ac076919003aecf0c..f1b35d6c04ff4248d797490919c0d6ff22b400d2 100644 (file)
@@ -355,7 +355,10 @@ function statusnet_post_hook(&$a,&$b) {
 
         logger('StatusNet post invoked');
 
-       if((local_user()) && (local_user() == $b['uid']) && (! $b['private']) && (!$b['parent']) ) {
+       if((local_user()) && (local_user() == $b['uid']) && (! $b['private'])) {
+
+               // mike 2-9-11 there was a restriction to only allow this for top level posts
+               // now relaxed so should allow one's own comments to be forwarded through the connector as well. 
 
                // Status.Net is not considered a private network
                if($b['prvnets'])
@@ -373,6 +376,9 @@ function statusnet_post_hook(&$a,&$b) {
 
                        $statusnet_post = get_pconfig(local_user(),'statusnet','post');
                        $statusnet_enable = (($statusnet_post && x($_POST,'statusnet_enable')) ? intval($_POST['statusnet_enable']) : 0);
+                       // if API is used, default to the chosen settings
+                       if($_POST['api_source'] && intval(get_pconfig(local_user(),'statusnet','post_by_default')))
+                               $statusnet_enable = 1;
 
                        if($statusnet_enable && $statusnet_post) {
                                require_once('include/bbcode.php');