...
 
Commits (2)
......@@ -157,12 +157,12 @@ class comments implements Interfaces\Api
]);
}
if (!$entity->getAllowComments()) {
if (method_exists($entity, 'getAllowComments') && !$entity->getAllowComments()) {
return Factory::response([
'status' => 'error',
'message' => 'Comments are disabled for this post'
]);
}
}
if (!$_POST['comment'] && !$_POST['attachment_guid']) {
return Factory::response([
......@@ -171,13 +171,6 @@ class comments implements Interfaces\Api
]);
}
if ($entity instanceof Entities\Activity && !$entity->commentsEnabled) {
return Factory::response([
'status' => 'error',
'message' => 'Comments are disabled for this post'
]);
}
/*if (!Security\ACL::_()->write($entity)) {
return Factory::response([
'status' => 'error',
......