add 'can_comment_on_post' hook so we can better deal with the complications of Diaspora policy
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user