mailbagit icon indicating copy to clipboard operation
mailbagit copied to clipboard

Controller refactoring

Open gwiedeman opened this issue 2 years ago • 2 comments

The problem the component solves

Currently, most of the mailbagit functionality is run step-by-step in the main controller, controller.py. This works fine, but there might be a more optimized way to structure some of this code.

Relevant part of mailbag spec?

n/a

Type of component

  • [x] Core
  • [ ] Input
  • [ ] Attachments
  • [ ] Derivatives conversion
  • [ ] Reporting/Exporting
  • [ ] GUI
  • [ ] Distribution

Expected contribution

  • [x] Pull Request
  • [x] Comment with proposed solution

Major challenges or things to keep in mind

gwiedeman avatar May 25 '22 20:05 gwiedeman

Disambiguation between accounts and messages is needed. This will this clean up duplicate logic that could be moved to the controller.

I believe that this is also blocking us from addressing #151, as mail.attachments objects can also return message objects. If much of the outside-of-message logic can be removed from .messages() then that method could potentially be called to parse message objects in mail.attachments.

gwiedeman avatar Jun 24 '22 17:06 gwiedeman

attached_msg-151 makes a poor attempt at this.

gwiedeman avatar Jun 24 '22 17:06 gwiedeman