use assignment notification parameter for collaborator notifications
This commit is contained in:
@@ -132,14 +132,6 @@ class RecordService
|
||||
$groupedCount = $groupedCountMap[$entity->getActionId()] ?? 0;
|
||||
}
|
||||
|
||||
if ($entity->getRelated() && $entity->getData()?->relatedName) {
|
||||
$entity->set('relatedName', $entity->getData()->relatedName);
|
||||
}
|
||||
|
||||
if ($entity->getCreatedBy() && $entity->getData()?->createdByName) {
|
||||
$entity->set('createdByName', $entity->getData()->createdByName);
|
||||
}
|
||||
|
||||
$entity->set('groupedCount', $groupedCount);
|
||||
}
|
||||
|
||||
@@ -218,6 +210,8 @@ class RecordService
|
||||
User $user
|
||||
): void {
|
||||
|
||||
$this->prepareSetFields($entity);
|
||||
|
||||
$noteId = $this->getNoteId($entity);
|
||||
|
||||
if (!$noteId) {
|
||||
@@ -471,4 +465,15 @@ class RecordService
|
||||
// @todo Param in preferences?
|
||||
return (bool) ($this->config->get('notificationGrouping') ?? true);
|
||||
}
|
||||
|
||||
private function prepareSetFields(Notification $entity): void
|
||||
{
|
||||
if ($entity->getRelated() && $entity->getData()?->relatedName) {
|
||||
$entity->set('relatedName', $entity->getData()->relatedName);
|
||||
}
|
||||
|
||||
if ($entity->getCreatedBy() && $entity->getData()?->createdByName) {
|
||||
$entity->set('createdByName', $entity->getData()->createdByName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user