ChiliProject is not maintained anymore. Please be advised that there will be no more updates.
We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.
[PATCH] Extensible MailHandler (Feature #170)
app/models/mail_handler is useful but not extensibly from plugins. I think it would be useful if MailHandler were extensible by making a subclass based on it.
I wrote the attached patch. This introduces MailHandler#dispatch_to_default which just calls receive_issue by default. Plugin can extend the dispatch table by overriding #dispatch_to_default.
Felix SchÃ¤fer wrote:
Couldn't you currently extend the model and replace/extend
alias_method_chain is a really hacky solution which is abused with great virtuosity in Redmine/ChiliProject plugins and creates a lot of pain sometimes. So if we have the opportunity to have an actual extensible API, we should really go for it.
I also thought about
alias_method_chain but if I recall ActionMailer classes do some funky tricks for their methods (partial singleton, class methods...). This makes patching is more difficult.
Having an overall extensible API for mail receiving is actually a great idea. Then plugins can hook into there to process their own email (e.g. like replying to the emails my Question plugin generates). I think Yuki Sonoda's patch is the simplest thing that could work.
- Status changed from Open to Ready for review
I've added Yuki's patch to a branch along with some rdoc comments. Ready for review.
- Assignee set to Eric Davis