Skip to content

Commit

Permalink
Fix activity notifications to respect civi setting (#1031)
Browse files Browse the repository at this point in the history
  • Loading branch information
jitendrapurohit authored Jan 18, 2025
1 parent 04848d0 commit 8970f26
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/WebformCivicrmPostProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -1567,7 +1567,9 @@ private function processActivities() {
$this->processAttachments('activity', $n, $activity['id'], empty($params['id']));
}
if (!empty($params['assignee_contact_id'])) {
if ($this->utils->wf_crm_get_civi_setting('activity_assignee_notification')) {
if ($this->utils->wf_crm_get_civi_setting('activity_assignee_notification')
&& !in_array($params['activity_type_id'], $this->utils->wf_crm_get_civi_setting('do_not_notify_assignees_for'))
) {
// Send email to assignees. TODO: Move to CiviCRM API?
$assignees = $this->utils->wf_crm_apivalues('contact', 'get', [
'id' => ['IN' => (array) $params['assignee_contact_id']],
Expand Down

0 comments on commit 8970f26

Please sign in to comment.