aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-08-11 22:35:36 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-08-11 22:35:36 -0700
commit2d9d4dfeb37f66d502e41ff47312aa4c257a3641 (patch)
treec115ef0f6f094e27da5d232df50a359927a190e8 /include/zot.php
parent0e8991fec2bc27f0bfab308cc9b04406e42c6dd8 (diff)
parentd882b3274bd3b2479b924683b75b03c7854ad453 (diff)
downloadvolse-hubzilla-2d9d4dfeb37f66d502e41ff47312aa4c257a3641.tar.gz
volse-hubzilla-2d9d4dfeb37f66d502e41ff47312aa4c257a3641.tar.bz2
volse-hubzilla-2d9d4dfeb37f66d502e41ff47312aa4c257a3641.zip
Merge https://github.com/redmatrix/redmatrix into pending_merge
Conflicts: doc/history.md mod/import.php
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/zot.php b/include/zot.php
index 0cb3ab9ed..bb1ccc46a 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -1537,7 +1537,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