@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+57 -37
+16 -16
resources/celerity/map.php
··· 337 337 'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '01774ab2', 338 338 'rsrc/js/application/conpherence/behavior-drag-and-drop-photo.js' => 'cf86d16a', 339 339 'rsrc/js/application/conpherence/behavior-durable-column.js' => '16c695bf', 340 - 'rsrc/js/application/conpherence/behavior-menu.js' => 'c0348cac', 340 + 'rsrc/js/application/conpherence/behavior-menu.js' => '43b24a10', 341 341 'rsrc/js/application/conpherence/behavior-pontificate.js' => '21ba5861', 342 342 'rsrc/js/application/conpherence/behavior-quicksand-blacklist.js' => '7927a7d3', 343 343 'rsrc/js/application/conpherence/behavior-widget-pane.js' => '93568464', ··· 545 545 'javelin-behavior-choose-control' => '6153c708', 546 546 'javelin-behavior-config-reorder-fields' => 'b6993408', 547 547 'javelin-behavior-conpherence-drag-and-drop-photo' => 'cf86d16a', 548 - 'javelin-behavior-conpherence-menu' => 'c0348cac', 548 + 'javelin-behavior-conpherence-menu' => '43b24a10', 549 549 'javelin-behavior-conpherence-pontificate' => '21ba5861', 550 550 'javelin-behavior-conpherence-widget-pane' => '93568464', 551 551 'javelin-behavior-countdown-timer' => 'e4cc26b3', ··· 1105 1105 'javelin-dom', 1106 1106 'javelin-request', 1107 1107 ), 1108 + '43b24a10' => array( 1109 + 'javelin-behavior', 1110 + 'javelin-dom', 1111 + 'javelin-util', 1112 + 'javelin-stratcom', 1113 + 'javelin-workflow', 1114 + 'javelin-behavior-device', 1115 + 'javelin-history', 1116 + 'javelin-vector', 1117 + 'javelin-scrollbar', 1118 + 'phabricator-title', 1119 + 'phabricator-shaped-request', 1120 + 'conpherence-thread-manager', 1121 + ), 1108 1122 '44168bad' => array( 1109 1123 'javelin-behavior', 1110 1124 'javelin-dom', ··· 1777 1791 'javelin-dom', 1778 1792 'javelin-util', 1779 1793 'phabricator-shaped-request', 1780 - ), 1781 - 'c0348cac' => array( 1782 - 'javelin-behavior', 1783 - 'javelin-dom', 1784 - 'javelin-util', 1785 - 'javelin-stratcom', 1786 - 'javelin-workflow', 1787 - 'javelin-behavior-device', 1788 - 'javelin-history', 1789 - 'javelin-vector', 1790 - 'javelin-scrollbar', 1791 - 'phabricator-title', 1792 - 'phabricator-shaped-request', 1793 - 'conpherence-thread-manager', 1794 1794 ), 1795 1795 'c1700f6f' => array( 1796 1796 'javelin-install',
+15
src/applications/conpherence/editor/ConpherenceEditor.php
··· 576 576 return $body; 577 577 } 578 578 579 + protected function addEmailPreferenceSectionToMailBody( 580 + PhabricatorMetaMTAMailBody $body, 581 + PhabricatorLiskDAO $object, 582 + array $xactions) { 583 + 584 + $href = PhabricatorEnv::getProductionURI( 585 + '/'.$object->getMonogram().'?settings'); 586 + if ($object->getIsRoom()) { 587 + $label = pht('EMAIL PREFERENCES FOR THIS ROOM'); 588 + } else { 589 + $label = pht('EMAIL PREFERENCES FOR THIS MESSAGE'); 590 + } 591 + $body->addLinkSection($label, $href); 592 + } 593 + 579 594 protected function getMailSubjectPrefix() { 580 595 return PhabricatorEnv::getEnvConfig('metamta.conpherence.subject-prefix'); 581 596 }
-20
src/applications/metamta/view/PhabricatorMetaMTAMailBody.php
··· 158 158 return $this; 159 159 } 160 160 161 - 162 - /** 163 - * Add a section with a link to email preferences. 164 - * 165 - * @return this 166 - * @task compose 167 - */ 168 - public function addEmailPreferenceSection() { 169 - if (!PhabricatorEnv::getEnvConfig('metamta.email-preferences')) { 170 - return $this; 171 - } 172 - 173 - $href = PhabricatorEnv::getProductionURI( 174 - '/settings/panel/emailpreferences/'); 175 - $this->addLinkSection(pht('EMAIL PREFERENCES'), $href); 176 - 177 - return $this; 178 - } 179 - 180 - 181 161 /** 182 162 * Add an attachment. 183 163 *
+21 -1
src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
··· 2058 2058 2059 2059 $reply_handler = $this->buildReplyHandler($object); 2060 2060 2061 - $body->addEmailPreferenceSection(); 2061 + if (PhabricatorEnv::getEnvConfig('metamta.email-preferences')) { 2062 + $this->addEmailPreferenceSectionToMailBody( 2063 + $body, 2064 + $object, 2065 + $xactions); 2066 + } 2062 2067 2063 2068 $template 2064 2069 ->setFrom($this->getActingAsPHID()) ··· 2307 2312 $this->addCustomFieldsToMailBody($body, $object, $xactions); 2308 2313 return $body; 2309 2314 } 2315 + 2316 + 2317 + /** 2318 + * @task mail 2319 + */ 2320 + protected function addEmailPreferenceSectionToMailBody( 2321 + PhabricatorMetaMTAMailBody $body, 2322 + PhabricatorLiskDAO $object, 2323 + array $xactions) { 2324 + 2325 + $href = PhabricatorEnv::getProductionURI( 2326 + '/settings/panel/emailpreferences/'); 2327 + $body->addLinkSection(pht('EMAIL PREFERENCES'), $href); 2328 + } 2329 + 2310 2330 2311 2331 /** 2312 2332 * @task mail
+5
webroot/rsrc/js/application/conpherence/behavior-menu.js
··· 297 297 var widget = 'conpherence-message-pane'; 298 298 if (device == 'desktop') { 299 299 widget = 'widgets-people'; 300 + var uri = JX.$U(location.href); 301 + var params = uri.getQueryParams(); 302 + if (params['settings'] !== null) { 303 + widget = 'widgets-settings'; 304 + } 300 305 } 301 306 return widget; 302 307 }