aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-08-11 22:32:33 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-08-11 22:32:33 -0700
commit1aa48ddfaa51017905fe9869f42e63fcf002b096 (patch)
tree74d75bff79f59fe1851022630504d1aa78a80ee5
parentf30d2b489a1e16dea1bb8e2ce840d577426f79e0 (diff)
parentad02d5589dfea6ea2b587aeabfb0ef5fe4fef67c (diff)
downloadvolse-hubzilla-1aa48ddfaa51017905fe9869f42e63fcf002b096.tar.gz
volse-hubzilla-1aa48ddfaa51017905fe9869f42e63fcf002b096.tar.bz2
volse-hubzilla-1aa48ddfaa51017905fe9869f42e63fcf002b096.zip
Merge https://github.com/redmatrix/redmatrix into pending_merge
-rw-r--r--include/zot.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/zot.php b/include/zot.php
index a677da808..b88bf72c3 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -1560,7 +1560,17 @@ 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';
+ }
// This is our own post, possibly coming from a channel clone