aboutsummaryrefslogtreecommitdiffstats
path: root/addon/facebook
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-04-26 20:11:15 -0700
committerFriendika <info@friendika.com>2011-04-26 20:11:15 -0700
commit0d23f56ed210402c6b77405273f12ad80a114556 (patch)
tree9e92c20c7ff3fbcccbaa9850178bca2ba886c771 /addon/facebook
parent8fbdb61ee2a34232f263fe3d418b933e8a19531e (diff)
downloadvolse-hubzilla-0d23f56ed210402c6b77405273f12ad80a114556.tar.gz
volse-hubzilla-0d23f56ed210402c6b77405273f12ad80a114556.tar.bz2
volse-hubzilla-0d23f56ed210402c6b77405273f12ad80a114556.zip
doco
Diffstat (limited to 'addon/facebook')
-rw-r--r--addon/facebook/facebook.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/addon/facebook/facebook.php b/addon/facebook/facebook.php
index 5f21ab348..cf7815845 100644
--- a/addon/facebook/facebook.php
+++ b/addon/facebook/facebook.php
@@ -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;
}