Support for custom keywords - #1031
Conversation
|
Hello Louis! Thank you for your PR! I have a quick question, does this PR implement just keywords (IMAP standard) or labels similar Best regards |
|
Just keywords, but that's enough to quite easily implement labels in your webmail. I've implemented labels in our webmail using this :) Since labels aren't an IMAP server feature, I didn't feel like it was in scope for wildduck, but keywords are. |
|
Ah something I forgot to say is that I of course added a keyword filter to the message search endpoint. So you can actually list messages for a keyword. That together with counters makes it usable as labels within a webmail |
|
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 20 days. |
|
Bumpiebump |
|
Might merge next week when I finally get to it :D |
|
Hello @louis-lau. It is showing me that this branch has conflicts and I cannot seem to fix them. Can you please review what is conflicting exactly and fix that? |
|
Just rebased to fix conflicts. Haven't tested the result though, I'll do so later, or you can if you'd like in the meantime :) |
|
@louis-lau Hello! |
|
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 20 days. |
This has been a long time coming, finally found the motivation recently :)
This PR adds support for custom keywords (which are just flags). You can use these to represent labels in a webmail (#763), and sync those same labels with for example Thunderbird over IMAP.
Overview:
KEYWORD_COUNTERS) for that keyword. Implemented it this way to avoid computing counters for irrelevant keywords IMAP clients might addkeywordsonEXISTS, andaddedKeywordsandremovedKeywordsonFETCHFLAGGED_COUNTER)Some things:
$addToSetand$pullin the same query. I switched it over to a simple aggregation pipeline that does allow for this.flaggedin the db for some reason? Assuming that's wrong and fixedI normally only work on modern TS codebases, so JS plus the old callback style isn't too familiar for me. Let me know if you see any obvious mistakes :)