Allow "!accept" to be enabled through configuration
Summary: For reasons explained in the config I've omitted this from the default action set, but it's trivial to support it. See D916. Test Plan: Commented on a revision, was informed I could "!accept" in the email. Used "!accept" to accept the revision. Reviewers: Makinde, jungejason, nh, tuomaspelkonen, aran Reviewed By: Makinde CC: aran, Makinde Differential Revision: 928
This commit is contained in:
@@ -88,7 +88,7 @@ class DifferentialReplyHandler extends PhabricatorMailReplyHandler {
|
||||
}
|
||||
|
||||
public function getSupportedCommands() {
|
||||
return array(
|
||||
$actions = array(
|
||||
DifferentialAction::ACTION_COMMENT,
|
||||
DifferentialAction::ACTION_REJECT,
|
||||
DifferentialAction::ACTION_ABANDON,
|
||||
@@ -97,6 +97,12 @@ class DifferentialReplyHandler extends PhabricatorMailReplyHandler {
|
||||
DifferentialAction::ACTION_RETHINK,
|
||||
'unsubscribe',
|
||||
);
|
||||
|
||||
if (PhabricatorEnv::getEnvConfig('differential.enable-email-accept')) {
|
||||
$actions[] = DifferentialAction::ACTION_ACCEPT;
|
||||
}
|
||||
|
||||
return $actions;
|
||||
}
|
||||
|
||||
public function receiveEmail(PhabricatorMetaMTAReceivedMail $mail) {
|
||||
|
||||
Reference in New Issue
Block a user