diff options
author | friendica <info@friendica.com> | 2014-03-26 18:45:01 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-03-26 18:45:01 -0700 |
commit | ed14c1f224afadb5dd5417d4078f853ff97b30cb (patch) | |
tree | cd527019841d3b3bfd98e8cdefaf03154db64bb0 /include/zot.php | |
parent | 150bc9866a24303c86b78614b58b8d01a245b424 (diff) | |
download | volse-hubzilla-ed14c1f224afadb5dd5417d4078f853ff97b30cb.tar.gz volse-hubzilla-ed14c1f224afadb5dd5417d4078f853ff97b30cb.tar.bz2 volse-hubzilla-ed14c1f224afadb5dd5417d4078f853ff97b30cb.zip |
more work on firehose
Diffstat (limited to 'include/zot.php')
-rw-r--r-- | include/zot.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/include/zot.php b/include/zot.php index c82918b3a..186f1da10 100644 --- a/include/zot.php +++ b/include/zot.php @@ -1354,16 +1354,18 @@ function allowed_public_recips($msg) { } -function process_delivery($sender,$arr,$deliveries,$relay) { +function process_delivery($sender,$arr,$deliveries,$relay,$public = false) { $result = array(); // We've validated the sender. Now make sure that the sender is the owner or author - if($sender['hash'] != $arr['owner_xchan'] && $sender['hash'] != $arr['author_xchan']) { - logger("process_delivery: sender {$sender['hash']} is not owner {$arr['owner_xchan']} or author {$arr['author_xchan']} - mid {$arr['mid']}"); - return; + if(! $public) { + if($sender['hash'] != $arr['owner_xchan'] && $sender['hash'] != $arr['author_xchan']) { + logger("process_delivery: sender {$sender['hash']} is not owner {$arr['owner_xchan']} or author {$arr['author_xchan']} - mid {$arr['mid']}"); + return; + } } foreach($deliveries as $d) { @@ -1394,7 +1396,7 @@ function process_delivery($sender,$arr,$deliveries,$relay) { } } - if((! perm_is_allowed($channel['channel_id'],$sender['hash'],$perm)) && (! $tag_delivery)) { + if((! perm_is_allowed($channel['channel_id'],$sender['hash'],$perm)) && (! $tag_delivery) && (! $public)) { logger("permission denied for delivery {$channel['channel_id']}"); $result[] = array($d['hash'],'permission denied',$channel['channel_name'] . ' <' . $channel['channel_address'] . '@' . get_app()->get_hostname() . '>'); continue; |