EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
notificationGrouping param
Yuri Kuznetsovf5e145a97191
diff --git a/application/Espo/Resources/defaults/config.php b/application/Espo/Resources/defaults/config.phpindex 9683a4f387..ae70277f1d 100644--- a/application/Espo/Resources/defaults/config.php+++ b/application/Espo/Resources/defaults/config.php@@ -184,6 +184,7 @@ return ['emailMessageMaxSize' => 10,'emailRecipientAddressMaxCount' => 100,'notificationsCheckInterval' => 10,+ 'notificationGrouping' => true,'popupNotificationsCheckInterval' => 15,'maxEmailAccountCount' => 2,'followCreatedEntities' => false,diff --git a/application/Espo/Tools/Notification/RecordService.php b/application/Espo/Tools/Notification/RecordService.phpindex 84b5f0b48f..385168b236 100644--- a/application/Espo/Tools/Notification/RecordService.php+++ b/application/Espo/Tools/Notification/RecordService.php@@ -37,6 +37,7 @@ use Espo\Core\Name\Field;use Espo\Core\Record\Collection as RecordCollection;use Espo\Core\Select\SearchParams;use Espo\Core\Select\SelectBuilderFactory;+use Espo\Core\Utils\Config;use Espo\Core\Utils\Metadata;use Espo\Entities\Note;use Espo\Entities\Notification;@@ -59,6 +60,7 @@ class RecordServiceprivate Metadata $metadata,private NoteAccessControl $noteAccessControl,private SelectBuilderFactory $selectBuilderFactory,+ private Config $config,) {}/**@@ -458,7 +460,6 @@ class RecordServiceprivate function isGroupingEnabled(): bool{- // @todo Config param?- return true;+ return (bool) ($this->config->get('notificationGrouping') ?? true);}}