Detect package change and send out email
Summary:
For package creation and deletion, send email to all the owners For
package modification, detect important fields such as owners and paths, and then
send out emails to all owners (including deleted owners and current owners)
Also start using transaction for package creation/deletion/modification.
Test Plan:
- tested mail creation and deletion
- tested modification to auditing enabled, primary owners, owners, paths
Reviewers: epriestley, nh, vrana
Reviewed By: epriestley
CC: prithvi, aran, Koolvin
Differential Revision: https://secure.phabricator.com/D2470
2012-05-07 09:19:44 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class OwnersPackageReplyHandler extends PhabricatorMailReplyHandler {
|
|
|
|
public function validateMailReceiver($mail_receiver) {
|
|
|
|
if (!($mail_receiver instanceof PhabricatorOwnersPackage)) {
|
|
|
|
throw new Exception("Receiver is not a PhabricatorOwnersPackage!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getPrivateReplyHandlerEmailAddress(
|
|
|
|
PhabricatorObjectHandle $handle) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getPublicReplyHandlerEmailAddress() {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getReplyHandlerDomain() {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getReplyHandlerInstructions() {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2012-08-28 23:09:37 +02:00
|
|
|
protected function receiveEmail(PhabricatorMetaMTAReceivedMail $mail) {
|
Detect package change and send out email
Summary:
For package creation and deletion, send email to all the owners For
package modification, detect important fields such as owners and paths, and then
send out emails to all owners (including deleted owners and current owners)
Also start using transaction for package creation/deletion/modification.
Test Plan:
- tested mail creation and deletion
- tested modification to auditing enabled, primary owners, owners, paths
Reviewers: epriestley, nh, vrana
Reviewed By: epriestley
CC: prithvi, aran, Koolvin
Differential Revision: https://secure.phabricator.com/D2470
2012-05-07 09:19:44 +02:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|