1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-28 17:52:43 +01:00
phorge-phorge/src/applications/macro
epriestley 341079c3cf Move some received mail responsibility to applications
Summary:
Ref T1205. Continuation of D5915.

Currently, `PhabricatorMetaMTAReceivedMail` has //all// the logic for routing mail. In particular:

  - New mail receivers in applications must edit it.
  - Mail receivers don't drop out when applications are uninstalled.

Applications have some logic in subclasses of `PhabricatorMailReplyHandler`, but this class is a bit of a mess. It is also heavily based on the assumption that mail receivers are objects (like revisions), but this is not true in at least two cases today (creating new tasks with `bugs@`, creating a new Conpherence thread) and likely other cases in the future (e.g., revision-by-mail).

Move this logic into a new `PhabricatorMailReceiver` classtree. This is similar to `PhabricatorMailReplyHandler` but a bit cleaner and more general. I plan to heavily reduce the responsibilities of `PhabricatorMailReplyHandler` or possibly eliminate it entirely.

For now, the new classtree doesn't do much of interest. The only behavioral change this diff causes is that Phabricator will now reject mail to an application when that application is uninstalled.

I also moved all the `ReplyHandler` classes into `mail/` directories in their respective applications.

Test Plan: Unit tests, used receive test to route mail to various objects.

Reviewers: btrahan

Reviewed By: btrahan

CC: Afaque_Hussain, edward, aran

Maniphest Tasks: T1205

Differential Revision: https://secure.phabricator.com/D5922
2013-05-14 10:57:41 -07:00
..
application Adding some filters and queries to Macro application 2013-03-22 09:46:22 -07:00
conduit Vastly expanded macro.query's capabilities 2013-03-26 14:29:04 -07:00
config MetaMTA: Owners, Pholio, Macro 2013-01-16 10:52:30 -08:00
constants Modernize Macro application 2012-12-11 14:01:03 -08:00
controller Add actions to mobile crumbs 2013-04-10 13:08:36 -07:00
editor Use transactions to show edit history for Configuration 2013-01-01 18:14:41 -08:00
mail Move some received mail responsibility to applications 2013-05-14 10:57:41 -07:00
query Fixing a severe bug in PhabricatorMacroQuery 2013-03-22 13:48:23 -07:00
remarkup Implement text mode for Phabricator Remarkup rules 2013-03-22 17:33:36 -07:00
storage Adding some filters and queries to Macro application 2013-03-22 09:46:22 -07:00