fix: provider, than fallback to fetcher#1314
Conversation
Signed-off-by: drew <me@andrinoff.com>
floatpanebot
left a comment
There was a problem hiding this comment.
Hi @andrinoff! Please fix the following issues with your PR:
- Title: Is too long (43 characters). The PR title must be strictly under 40 characters.
Signed-off-by: drew <me@andrinoff.com>
floatpanebot
left a comment
There was a problem hiding this comment.
Hi @andrinoff! Please fix the following issues with your PR:
- Title: Is too long (43 characters). The PR title must be strictly under 40 characters.
|
/build |
Formatting issues have been resolved. Thank you!
Build complete (
|
| OS | Arch | Download |
|---|---|---|
| Linux | amd64 | matcha_preview_linux_amd64.tar.gz |
| Linux | arm64 | matcha_preview_linux_arm64.tar.gz |
| macOS | amd64 | matcha_preview_darwin_amd64.tar.gz |
| macOS | arm64 | matcha_preview_darwin_arm64.tar.gz |
| Windows | amd64 | matcha_preview_windows_amd64.zip |
| Windows | arm64 | matcha_preview_windows_arm64.zip |
|
Add Closes #1309 to description |
| // mailboxFolderName resolves a TUI MailboxKind to a backend folder name. | ||
| // IMAP-specific provider quirks (Gmail's "[Gmail]/Sent Mail" etc.) are | ||
| // preserved via ServiceProvider; non-IMAP backends use logical names. | ||
| func mailboxFolderName(acc *config.Account, mailbox tui.MailboxKind) string { |
There was a problem hiding this comment.
The comment says non-IMAP backends use logical folder names, but this mapping is driven only by ServiceProvider. If a non-IMAP account has ServiceProvider set, we can pass IMAP-specific names like [Gmail]/All Mail into JMAP/maildir providers. Should the Gmail/Outlook/iCloud mapping be gated to IMAP accounts only, and return Sent/Trash/Archive for other protocols?
The problematic part is that the new function checks ServiceProvider, but does not check Protocol.
So if an account has:
Protocol: "maildir"
ServiceProvider: "gmail"the code may resolve:
Archive -> [Gmail]/All Mail
But for maildir it should resolve to:
Archive -> Archive
There was a problem hiding this comment.
i honestly don't really know how else to write it. the person creating the issue does not need a provider, so it will not even go there. i'll think of it in a latter PR.
What?
Uses the provider, than falls back to normal fetcher.
Why?
fetchFoldersCmdcalledfetcher.FetchFolders(&acc)directly. That path is IMAP-only —connectWithOptionsrejects emptyimap_serverwith "unsupported service_provider". Maildir backend has its ownFetchFoldersbut was bypassed.closes #1309