Projects - add mail to project updates
Summary: ...which lets all the fancy settings for Email | Notify | Off be possible. Fixes T8164. Wasn't too sure the best way to break things up but members vs watchers felt meaningful to break out to me. Also fixes a small bug where we were generating bad slug updated stories by messing with the signature of the slug data. Perhaps this fix isn't even good enough (the array_keys()) call and instead we'll need to implement transaction has effect and do a sort? Test Plan: used ./bin/mail list-outbound and ./bin/mail show-outbound --id XX to verify reasonable emails were being generated. saw new preferences in settings. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T8164 Differential Revision: https://secure.phabricator.com/D12868
This commit is contained in:
20
src/applications/project/mail/ProjectReplyHandler.php
Normal file
20
src/applications/project/mail/ProjectReplyHandler.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
final class ProjectReplyHandler
|
||||
extends PhabricatorApplicationTransactionReplyHandler {
|
||||
|
||||
public function validateMailReceiver($mail_receiver) {
|
||||
if (!($mail_receiver instanceof PhabricatorProject)) {
|
||||
throw new Exception('Mail receiver is not a PhabricatorProject.');
|
||||
}
|
||||
}
|
||||
|
||||
public function getObjectPrefix() {
|
||||
return PhabricatorProjectProjectPHIDType::TYPECONST;
|
||||
}
|
||||
|
||||
protected function shouldCreateCommentFromMailBody() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user