]> git.mxchange.org Git - friendica.git/commitdiff
doco
authorFriendika <info@friendika.com>
Wed, 27 Apr 2011 03:11:15 +0000 (20:11 -0700)
committerFriendika <info@friendika.com>
Wed, 27 Apr 2011 03:11:15 +0000 (20:11 -0700)
addon/facebook/facebook.php

index 5f21ab348beb5adabe000b43e6d7d9996c9674ff..cf7815845f82e7b7494ce700125e1a60024dc40d 100644 (file)
@@ -385,6 +385,21 @@ function facebook_post_hook(&$a,&$b) {
                        if(count($r)) 
                                foreach($r as $rr)
                                        $deny_arr[] = $rr['notify'];
+                       if(count($deny_arr) && (! count($allow_arr))) {
+
+                               // One or more FB folks were denied access but nobody on FB was specifically allowed access.
+                               // This might cause the post to be open to public on Facebook, but only to selected members
+                               // on another network. Since this could potentially leak a post to somebody who was denied, 
+                               // we will skip posting it to Facebook with a slightly vague but relevant message that will 
+                               // hopefully lead somebody to this code comment for a better explanation of what went wrong.
+
+                               notice( t('Post to Facebook cancelled because of multi-network access permission conflict.') . EOL);
+                               return;
+                       }
+
+
+                       // if it's a private message but no Facebook members are allowed or denied, skip Facebook post
+
                        if((! count($allow_arr)) && (! count($deny_arr)))
                                return;
                }