Subfolders shouldn't be taken into account for special roles
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1k
- Forks
- 348
- Avg merge
- 12h 28m
- Merged PRs (30d)
- 91
Description
How to reproduce
Add new email account that has a subfolder called "inbox" and or "drafts". E.g.
- INBOX
- Drafts
- ...
- MyProject
- Inbox
- Accounting
- 2020
- Drafts
- Other Folder
Expected behavior
The top-level mailboxes "INBOX" and "Drafts" are getting a dedicated icon and are moved to the top. Other folders, especially the subfolders "MyProject/Inbox" and "MyProject/Drafts" are treated and displayed as normal folders where they are.
Actual behavior
Subfolders "MyProject/Inbox" and "MyProject/Drafts" are treated as special role mailboxes and show up as an additional inbox (or drafts folder resp.) with the special icon etc on the top level (see screenshot).

Warning: Careful when testing code changes. The special role is assigned when adding the account to Nextcloud and will not be refreshed when reloading.
Mail app
Mail app version: 1.8.0 - master (c63a38f99ca2d1e061c2a3bcbe05552098d93b01)
Mailserver or service: Host Europe, I think it's Dovecot IMAP
Server configuration
PHP version: 7.4
Nextcloud Version: 20.0.5 - master (a308c9be90ba174154727c4239cd968707d4c7e8)
Client configuration
Browser: Firefox 84
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing special-role assignment during account creation and how mailbox paths are classified for display. Reproduce the account setup with nested Inbox and Drafts folders, then verify that only top-level role mailboxes receive special icons and placement while subfolders remain ordinary folders.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, php
- Domain
- backend, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100