@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.

Remove old code for sending email to external users who create objects via inbound mail

Summary:
Ref T13493. I'm updating callers to `getAccountID()` to prepare to move it to a separate table.

This callsite once supported this flow:

- External users with no accounts send mail to `bugs@`.
- This creates tasks in Maniphest.
- They're CC'd when the tasks are updated.

However, after T12237 we never actually send this mail (since their addresses are necessarily unverified).

I left this code in in case this needed to be revisited, but it hasn't been an issue. Just remove it and treat these users as undeliverable.

Test Plan: As a cursory test for nothing being horribly broken, sent some object mail.

Maniphest Tasks: T13493

Differential Revision: https://secure.phabricator.com/D21007

-40
-40
src/applications/metamta/query/PhabricatorMetaMTAActorQuery.php
··· 36 36 case PhabricatorPeopleUserPHIDType::TYPECONST: 37 37 $this->loadUserActors($actors, $phids); 38 38 break; 39 - case PhabricatorPeopleExternalPHIDType::TYPECONST: 40 - $this->loadExternalUserActors($actors, $phids); 41 - break; 42 39 default: 43 40 $this->loadUnknownActors($actors, $phids); 44 41 break; ··· 93 90 } 94 91 } 95 92 } 96 - 97 - private function loadExternalUserActors(array $actors, array $phids) { 98 - assert_instances_of($actors, 'PhabricatorMetaMTAActor'); 99 - 100 - $xusers = id(new PhabricatorExternalAccountQuery()) 101 - ->setViewer($this->getViewer()) 102 - ->withPHIDs($phids) 103 - ->execute(); 104 - $xusers = mpull($xusers, null, 'getPHID'); 105 - 106 - foreach ($phids as $phid) { 107 - $actor = $actors[$phid]; 108 - 109 - $xuser = idx($xusers, $phid); 110 - if (!$xuser) { 111 - $actor->setUndeliverable(PhabricatorMetaMTAActor::REASON_UNLOADABLE); 112 - continue; 113 - } 114 - 115 - $actor->setName($xuser->getDisplayName()); 116 - 117 - if ($xuser->getAccountType() != 'email') { 118 - $actor->setUndeliverable(PhabricatorMetaMTAActor::REASON_EXTERNAL_TYPE); 119 - continue; 120 - } 121 - 122 - $actor->setEmailAddress($xuser->getAccountID()); 123 - 124 - // Circa T7477, it appears that we never intentionally send email to 125 - // external users (even when they email "bugs@" to create a task). 126 - // Mark these users as unverified so mail to them is always dropped. 127 - // See also T12237. In the future, we might change this behavior. 128 - 129 - $actor->setIsVerified(false); 130 - } 131 - } 132 - 133 93 134 94 private function loadUnknownActors(array $actors, array $phids) { 135 95 foreach ($phids as $phid) {