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

Stop moving "Cc" addresses to "To" when building mail targets

Summary: Fixes T10539. When building mail targets, we fail to preserve whether a recipient was originally "To" or "Cc", and just move everyone to "To".

Test Plan:
Added a comment to a task with a "To" user and a "Cc" user, with `metamta.placeholder-to-recipient` set and `metamta.one-mail-per-recipient` set.

Got mail with me Cc'd as the Cc'd user:

{F1172020}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10539

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

+11 -2
+11 -2
src/applications/metamta/replyhandler/PhabricatorMailReplyHandler.php
··· 254 254 $map = $to + $cc; 255 255 256 256 foreach ($map as $phid => $user) { 257 + // Preserve the original To/Cc information on the target. 258 + if (isset($to[$phid])) { 259 + $target_to = array($phid => $user); 260 + $target_cc = array(); 261 + } else { 262 + $target_to = array(); 263 + $target_cc = array($phid => $user); 264 + } 265 + 257 266 $target = id(clone $template) 258 267 ->setViewer($user) 259 - ->setToMap(array($phid => $user)) 260 - ->setCCMap(array()); 268 + ->setToMap($target_to) 269 + ->setCCMap($target_cc); 261 270 262 271 if ($supports_private_replies) { 263 272 $reply_to = $this->getPrivateReplyHandlerEmailAddress($user);