Skip to content

Meta mail notifications 2703851#1

Open
edurenye wants to merge 3 commits into
8.x-1.xfrom
meta_mail_notifications-2703851
Open

Meta mail notifications 2703851#1
edurenye wants to merge 3 commits into
8.x-1.xfrom
meta_mail_notifications-2703851

Conversation

@edurenye

Copy link
Copy Markdown
Owner

No description provided.

@edurenye edurenye force-pushed the meta_mail_notifications-2703851 branch 2 times, most recently from b554a21 to dfb7876 Compare April 21, 2016 15:51
/** @var \Drupal\tmgmt\JobItemInterface $original */
$original = $job_item->original;
if ($job_item->isNeedsReview() && !$original->isNeedsReview()) {
\Drupal::service('tmgmt_courier.notification')->sendNotification('job_item_needs_review', ['tmgmt_job_item' => $job_item, 'tmgmt_job' => $job_item->getJob()]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each notification needs to be sent to a default recipient. Here it's the job creator.
A template can optionally override the recipient.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah the default recipient should be identified by the Account object, not an email. Then courier can negotiate based on account and consider user preferences including switching to an SMS instead of a mail.

@edurenye edurenye force-pushed the meta_mail_notifications-2703851 branch from 48ac6f4 to 0936fb9 Compare April 28, 2016 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants