Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14620349
D18748.id45001.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D18748.id45001.diff
View Options
diff --git a/src/applications/differential/editor/DifferentialTransactionEditor.php b/src/applications/differential/editor/DifferentialTransactionEditor.php
--- a/src/applications/differential/editor/DifferentialTransactionEditor.php
+++ b/src/applications/differential/editor/DifferentialTransactionEditor.php
@@ -9,6 +9,7 @@
private $didExpandInlineState = false;
private $hasReviewTransaction = false;
private $affectedPaths;
+ private $firstBroadcast = false;
public function getEditorApplicationClass() {
return 'PhabricatorDifferentialApplication';
@@ -27,7 +28,7 @@
}
public function isFirstBroadcast() {
- return $this->getIsNewObject();
+ return $this->firstBroadcast;
}
public function getDiffUpdateTransaction(array $xactions) {
@@ -1449,11 +1450,13 @@
protected function getCustomWorkerState() {
return array(
'changedPriorToCommitURI' => $this->changedPriorToCommitURI,
+ 'firstBroadcast' => $this->firstBroadcast,
);
}
protected function loadCustomWorkerState(array $state) {
$this->changedPriorToCommitURI = idx($state, 'changedPriorToCommitURI');
+ $this->firstBroadcast = idx($state, 'firstBroadcast');
return $this;
}
@@ -1566,6 +1569,19 @@
// natural and more useful.
$author_phid = $object->getAuthorPHID();
+ // Additionally, we change the acting PHID for the transaction set
+ // to the author if it isn't already a user so that mail comes from
+ // the natural author.
+ $acting_phid = $this->getActingAsPHID();
+ $user_type = PhabricatorPeopleUserPHIDType::TYPECONST;
+ if (phid_get_type($acting_phid) != $user_type) {
+ $this->setActingAsPHID($author_phid);
+ }
+
+ // Mark this as the first broadcast we're sending about the revision
+ // so mail can generate specially.
+ $this->firstBroadcast = true;
+
$xaction = $object->getApplicationTransactionTemplate()
->setAuthorPHID($author_phid)
->setTransactionType(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 11, 3:39 AM (18 h, 14 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6984486
Default Alt Text
D18748.id45001.diff (2 KB)
Attached To
Mode
D18748: Clean up Differential draft mail behaviors
Attached
Detach File
Event Timeline
Log In to Comment