mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-24 14:30:56 +01:00
Send custom headers for author, reviewer and cc in Differential e-mails
Summary: I want to flag messages which require an immediate action from me in e-mail client. It is currently not possible because Author and Reviewers fields are both in To:. So the filtering rule cannot recognize if I am the person who should take the action. This diff adds these headers: - X-Differential-Author - X-Differential-Reviewers - X-Differential-CCs Test Plan: Send comment to the diff. Verify X-Differential-* headers. Reviewers: epriestley Reviewed By: epriestley CC: aran, epriestley Maniphest Tasks: T808 Differential Revision: https://secure.phabricator.com/D1724
This commit is contained in:
parent
21f0aba701
commit
f6d4cc4896
1 changed files with 19 additions and 0 deletions
|
@ -100,6 +100,25 @@ abstract class DifferentialMail {
|
||||||
$template->addHeader('X-Herald-Rules', $this->heraldRulesHeader);
|
$template->addHeader('X-Herald-Rules', $this->heraldRulesHeader);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$revision = $this->revision;
|
||||||
|
if ($revision) {
|
||||||
|
if ($revision->getAuthorPHID()) {
|
||||||
|
$template->addHeader(
|
||||||
|
'X-Differential-Author',
|
||||||
|
'<'.$revision->getAuthorPHID().'>');
|
||||||
|
}
|
||||||
|
if ($revision->getReviewers()) {
|
||||||
|
$template->addHeader(
|
||||||
|
'X-Differential-Reviewers',
|
||||||
|
'<'.implode('>, <', $revision->getReviewers()).'>');
|
||||||
|
}
|
||||||
|
if ($revision->getCCPHIDs()) {
|
||||||
|
$template->addHeader(
|
||||||
|
'X-Differential-CCs',
|
||||||
|
'<'.implode('>, <', $revision->getCCPHIDs()).'>');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$template->setIsBulk(true);
|
$template->setIsBulk(true);
|
||||||
$template->setRelatedPHID($this->getRevision()->getPHID());
|
$template->setRelatedPHID($this->getRevision()->getPHID());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue