mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Conpherence - massage email notification to have proper link to how to update email settings
Summary: Fixes T8329. I was able to figure out a reasonable way to have the full conpherence default to the email settings panel. I think this is cleaner than making things a dialogue as I rambled about in the description for T8329. Test Plan: using /bin/mail to verify correct email links were generated for conpherence notifications and maniphest (general) notifications. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T8329 Differential Revision: https://secure.phabricator.com/D13058
This commit is contained in:
parent
b2d003d025
commit
c7de17663a
5 changed files with 57 additions and 37 deletions
|
@ -337,7 +337,7 @@ return array(
|
|||
'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '01774ab2',
|
||||
'rsrc/js/application/conpherence/behavior-drag-and-drop-photo.js' => 'cf86d16a',
|
||||
'rsrc/js/application/conpherence/behavior-durable-column.js' => '16c695bf',
|
||||
'rsrc/js/application/conpherence/behavior-menu.js' => 'c0348cac',
|
||||
'rsrc/js/application/conpherence/behavior-menu.js' => '43b24a10',
|
||||
'rsrc/js/application/conpherence/behavior-pontificate.js' => '21ba5861',
|
||||
'rsrc/js/application/conpherence/behavior-quicksand-blacklist.js' => '7927a7d3',
|
||||
'rsrc/js/application/conpherence/behavior-widget-pane.js' => '93568464',
|
||||
|
@ -545,7 +545,7 @@ return array(
|
|||
'javelin-behavior-choose-control' => '6153c708',
|
||||
'javelin-behavior-config-reorder-fields' => 'b6993408',
|
||||
'javelin-behavior-conpherence-drag-and-drop-photo' => 'cf86d16a',
|
||||
'javelin-behavior-conpherence-menu' => 'c0348cac',
|
||||
'javelin-behavior-conpherence-menu' => '43b24a10',
|
||||
'javelin-behavior-conpherence-pontificate' => '21ba5861',
|
||||
'javelin-behavior-conpherence-widget-pane' => '93568464',
|
||||
'javelin-behavior-countdown-timer' => 'e4cc26b3',
|
||||
|
@ -1105,6 +1105,20 @@ return array(
|
|||
'javelin-dom',
|
||||
'javelin-request',
|
||||
),
|
||||
'43b24a10' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
'javelin-util',
|
||||
'javelin-stratcom',
|
||||
'javelin-workflow',
|
||||
'javelin-behavior-device',
|
||||
'javelin-history',
|
||||
'javelin-vector',
|
||||
'javelin-scrollbar',
|
||||
'phabricator-title',
|
||||
'phabricator-shaped-request',
|
||||
'conpherence-thread-manager',
|
||||
),
|
||||
'44168bad' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
|
@ -1778,20 +1792,6 @@ return array(
|
|||
'javelin-util',
|
||||
'phabricator-shaped-request',
|
||||
),
|
||||
'c0348cac' => array(
|
||||
'javelin-behavior',
|
||||
'javelin-dom',
|
||||
'javelin-util',
|
||||
'javelin-stratcom',
|
||||
'javelin-workflow',
|
||||
'javelin-behavior-device',
|
||||
'javelin-history',
|
||||
'javelin-vector',
|
||||
'javelin-scrollbar',
|
||||
'phabricator-title',
|
||||
'phabricator-shaped-request',
|
||||
'conpherence-thread-manager',
|
||||
),
|
||||
'c1700f6f' => array(
|
||||
'javelin-install',
|
||||
'javelin-util',
|
||||
|
|
|
@ -576,6 +576,21 @@ final class ConpherenceEditor extends PhabricatorApplicationTransactionEditor {
|
|||
return $body;
|
||||
}
|
||||
|
||||
protected function addEmailPreferenceSectionToMailBody(
|
||||
PhabricatorMetaMTAMailBody $body,
|
||||
PhabricatorLiskDAO $object,
|
||||
array $xactions) {
|
||||
|
||||
$href = PhabricatorEnv::getProductionURI(
|
||||
'/'.$object->getMonogram().'?settings');
|
||||
if ($object->getIsRoom()) {
|
||||
$label = pht('EMAIL PREFERENCES FOR THIS ROOM');
|
||||
} else {
|
||||
$label = pht('EMAIL PREFERENCES FOR THIS MESSAGE');
|
||||
}
|
||||
$body->addLinkSection($label, $href);
|
||||
}
|
||||
|
||||
protected function getMailSubjectPrefix() {
|
||||
return PhabricatorEnv::getEnvConfig('metamta.conpherence.subject-prefix');
|
||||
}
|
||||
|
|
|
@ -158,26 +158,6 @@ final class PhabricatorMetaMTAMailBody {
|
|||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add a section with a link to email preferences.
|
||||
*
|
||||
* @return this
|
||||
* @task compose
|
||||
*/
|
||||
public function addEmailPreferenceSection() {
|
||||
if (!PhabricatorEnv::getEnvConfig('metamta.email-preferences')) {
|
||||
return $this;
|
||||
}
|
||||
|
||||
$href = PhabricatorEnv::getProductionURI(
|
||||
'/settings/panel/emailpreferences/');
|
||||
$this->addLinkSection(pht('EMAIL PREFERENCES'), $href);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add an attachment.
|
||||
*
|
||||
|
|
|
@ -2058,7 +2058,12 @@ abstract class PhabricatorApplicationTransactionEditor
|
|||
|
||||
$reply_handler = $this->buildReplyHandler($object);
|
||||
|
||||
$body->addEmailPreferenceSection();
|
||||
if (PhabricatorEnv::getEnvConfig('metamta.email-preferences')) {
|
||||
$this->addEmailPreferenceSectionToMailBody(
|
||||
$body,
|
||||
$object,
|
||||
$xactions);
|
||||
}
|
||||
|
||||
$template
|
||||
->setFrom($this->getActingAsPHID())
|
||||
|
@ -2308,6 +2313,21 @@ abstract class PhabricatorApplicationTransactionEditor
|
|||
return $body;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @task mail
|
||||
*/
|
||||
protected function addEmailPreferenceSectionToMailBody(
|
||||
PhabricatorMetaMTAMailBody $body,
|
||||
PhabricatorLiskDAO $object,
|
||||
array $xactions) {
|
||||
|
||||
$href = PhabricatorEnv::getProductionURI(
|
||||
'/settings/panel/emailpreferences/');
|
||||
$body->addLinkSection(pht('EMAIL PREFERENCES'), $href);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @task mail
|
||||
*/
|
||||
|
|
|
@ -297,6 +297,11 @@ JX.behavior('conpherence-menu', function(config) {
|
|||
var widget = 'conpherence-message-pane';
|
||||
if (device == 'desktop') {
|
||||
widget = 'widgets-people';
|
||||
var uri = JX.$U(location.href);
|
||||
var params = uri.getQueryParams();
|
||||
if (params['settings'] !== null) {
|
||||
widget = 'widgets-settings';
|
||||
}
|
||||
}
|
||||
return widget;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue