Page MenuHomePhabricator

Persist excluded recipients when saving mail
ClosedPublic

Authored by epriestley on Aug 12 2014, 3:33 PM.
Tags
None
Referenced Files
F13227714: D10234.diff
Mon, May 20, 5:01 AM
F13214601: D10234.id24625.diff
Fri, May 17, 11:47 AM
F13207762: D10234.diff
Thu, May 16, 3:52 AM
F13207156: D10234.diff
Wed, May 15, 9:55 PM
F13199116: D10234.id24639.diff
Mon, May 13, 11:57 AM
F13191519: D10234.diff
Sat, May 11, 9:50 PM
Unknown Object (File)
Mon, May 6, 2:09 AM
Unknown Object (File)
Thu, Apr 25, 2:35 AM
Subscribers
Tokens
"Mountain of Wealth" token, awarded by btrahan.

Details

Summary

Fixes T5185. The fundamental issue is that this excludePHIDs property was not saved, so the logic went like this:

  • Generate excludePHIDs correctly.
  • Pass excludePHIDs through the stack.
  • Perform some other computations correctly.
  • Queue the mail for the daemons, throwing it away.
  • Daemons process mail with empty excludePHIDs list.

Store it in the persistent properties array instead.

Also remove the "override self mail" thing, since it's only used by bin/mail send-test and suffers from the same issue. I think it's too useless to fix, since even if you get caught by it, bin/mail makes it clear why the message was dropped.

Test Plan

Notable:

  • exclude present in properties
  • Exclusion reason under RECIPIENTS header

1$ ./bin/mail show-outbound --id 22653
2PROPERTIES
3ID: 22653
4Status: queued
5Related PHID: PHID-TASK-gdxfct3qqboudbmfye3h
6Message:
7
8PARAMETERS
9subject: T10000145: asdf
10from: PHID-USER-lqiz3yd7wmk64ejugvov
11subject-prefix: [Maniphest]
12vary-subject-prefix: [Commented On]
13thread-id: maniphest-task-PHID-TASK-gdxfct3qqboudbmfye3h
14is-first-message:
15exclude: ["PHID-USER-aeabc4ipqbifny3rw4ok"]
16mailtags: ["maniphest-comment"]
17is-bulk: 1
18parent-message-id: i4lboqya4tltd4qivqd4a2b4vxzvj4geythhmh2y7gi3uho4kuczrwttq7zoekj4
19cc: ["PHID-USER-aeabc4ipqbifny3rw4ok"]
20reply-to: prefix+T10000145+public+caace40165701255@localderp.com
21
22HEADERS
23Thread-Topic: T10000145: asdf
24X-Herald-Rules: <51>, none
25X-Phabricator-To: <PHID-USER-lqiz3yd7wmk64ejugvov>
26X-Phabricator-Cc: <PHID-USER-aeabc4ipqbifny3rw4ok>
27X-Phabricator-Cc: <PHID-USER-lqiz3yd7wmk64ejugvov>
28
29RECIPIENTS
30! duck (duck)
31 - This message is a response to another email message, and this recipient received the original email message, so we are not sending them this substantially similar message (for example, the sender used "Reply All" instead of "Reply" in response to mail from Phabricator).
32
33BODY
34epriestley added a comment.
35
36quackquack
37
38TASK DETAIL
39 http://local.aphront.com:8080/T10000145
40
41REPLY HANDLER ACTIONS
42 Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
43
44To: epriestley
45Cc: duck, epriestley

Diff Detail

Repository
rP Phabricator
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

epriestley retitled this revision from to Persist excluded recipients when saving mail.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
btrahan awarded a token.
btrahan edited edge metadata.
This revision is now accepted and ready to land.Aug 12 2014, 7:03 PM
epriestley updated this revision to Diff 24639.

Closed by commit rP500506bfef28 (authored by @epriestley).