public static function canComment($hook, $type, $permission, $params) {

		$entity = elgg_extract('entity', $params);

		if (!$entity instanceof Comment) {
			return $permission;
		}

		if ($entity->getDepthToOriginalContainer() >= (int) elgg_get_plugin_setting('max_comment_depth', 'hypeInteractions')) {
			return false;
		}
	}