aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-06-12 16:17:23 -0700
committerzotlabs <mike@macgirvin.com>2017-06-12 16:17:23 -0700
commit5b3e863323a6b70651454c0972a586e677f55c3d (patch)
treec72a0714fe37e0c320083d8eca8619e8f944a59d /include/items.php
parent6ce9eedb5fe746a70416fb66128d6b0ead6f949a (diff)
downloadvolse-hubzilla-5b3e863323a6b70651454c0972a586e677f55c3d.tar.gz
volse-hubzilla-5b3e863323a6b70651454c0972a586e677f55c3d.tar.bz2
volse-hubzilla-5b3e863323a6b70651454c0972a586e677f55c3d.zip
add 'can_comment_on_post' hook so we can better deal with the complications of Diaspora policy
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php
index 707f07f4a..e79707aeb 100755
--- a/include/items.php
+++ b/include/items.php
@@ -219,6 +219,11 @@ function can_comment_on_post($observer_xchan, $item) {
// logger('can_comment_on_post: comment_policy: ' . $item['comment_policy'], LOGGER_DEBUG);
+ $x = [ 'observer_hash' => $observer_xchan, 'item' => $item, 'allowed' => 'unset' ];
+ call_hooks('can_comment_on_post',$x);
+ if($x['allowed'] !== 'unset')
+ return $x['allowed'];
+
if(! $observer_xchan)
return false;