Files
phabricator/src/applications/project/mail/ProjectReplyHandler.php
Bob Trahan fa82c17079 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
2015-05-15 16:33:31 -07:00

21 lines
480 B
PHP

<?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;
}
}