Commit 957e7e55 authored by Marcelo Rivera's avatar Marcelo Rivera

(fix): groups conversations issue

parent 5845f667
1 merge request!289[Sprint/KiltedKoala] (fix): groups conversations issue
Pipeline #74164702 passed with stages
in 12 minutes and 38 seconds
......@@ -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',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment