aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Hannud Abdo <abdo@member.fsf.org>2015-08-14 12:21:05 -0300
committerAlexandre Hannud Abdo <abdo@member.fsf.org>2015-08-14 12:21:05 -0300
commit73b30de9cb22732f51ccca26695eced54683a895 (patch)
treee4b8f7d9be66aff787ab5c6e06157ae6270323fd
parent7a8d0a03f6ae9d892ee9a7e7196a4cec8f36cfaa (diff)
downloadvolse-hubzilla-73b30de9cb22732f51ccca26695eced54683a895.tar.gz
volse-hubzilla-73b30de9cb22732f51ccca26695eced54683a895.tar.bz2
volse-hubzilla-73b30de9cb22732f51ccca26695eced54683a895.zip
Properly fix which perms get checked for comments, Mike's solution
-rw-r--r--include/zot.php17
1 files changed, 3 insertions, 14 deletions
diff --git a/include/zot.php b/include/zot.php
index 17554a490..19bacfa4f 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -1560,20 +1560,9 @@ function process_delivery($sender, $arr, $deliveries, $relay, $public = false, $
$tag_delivery = tgroup_check($channel['channel_id'],$arr);
- $perm = (($arr['mid'] == $arr['parent_mid']) ? 'send_stream' : 'post_comments');
-
-// if ($arr['mid'] == $arr['parent_mid']){
-// $perm = 'send_stream';
-// }
-// else{
-// $r = q("select item_owner from item where item.mid = '%s' limit 1",
-// dbesc($arr['parent_mid']));
-// if($channel['channel_hash'] == $r[0]['item_owner'])
-// $perm = 'post_comments';
-// else
-// $perm = 'send_stream';
-// }
-//
+ $perm = 'send_stream';
+ if(($arr['mid'] !== $arr['parent_mid']) && ($relay))
+ $perm = 'post_comments';
// This is our own post, possibly coming from a channel clone