mail
mail copied to clipboard
In the search input above the envelope list, we should search in subject, to and from by default
Is your feature request related to a problem? Please describe.
It will be more convenient if the search shortcut above the envelope will search throw more field rather than just the subject.
Describe the solution you'd like
In the search input above the envelope list, we should search in subject, to and from by default, and not only for subject matches.
Work packages
- [x] Implementation
- [ ] User manual documentation
Additional context
No response
To search for matches in the subject OR the to field OR the from field we need to adapt the backend search API to also allow OR-ing search criteria. Right now everything is AND-ed.
-
\OCA\Mail\Controller\MessagesController::index
needs a new parameter for this -
\OCA\Mail\Contracts\IMailSearch::findMessages
/\OCA\Mail\Service\Search\MailSearch::findMessages
new a new parameter - Put the parameter into the search query object
- Adjust
\OCA\Mail\Db\MessageMapper::findIdsByQuery
and similar. Make sure the other parameters are still AND-ed, like mailbox id, thread root id, etc. Basically it becomes a big AND with a sub expression for the ORs of the search.
@ChristophWurst we don't actually need new parameters if we make it a token inside the query