Repository navigation
feat(imp): expose user IMAP keywords as mail/msgflags - #126
Merged
Merged
Conversation
ActiveSync needs each user's flag labels without unserializing IMP flag objects in horde/core. Publish a keyword-to-label map from the mail API so the allowed class list stays inside IMP_Flags.
Contributor
Author
|
Pairs with horde/Core#257. That pull request consumes |
1 of 3 tasks
ralflang
approved these changes
Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mail/msgflags, a keyword-to-label map of flags the current user created.Motivation
ActiveSync reads IMP's
msgflagspreference from horde/core. Since that preference is unserialized withallowed_classes => false(ZDI-20-1051), user flag objects become__PHP_Incomplete_Class. Sync then warns for every message, and the labels never reach the device.horde/Core#252 proposes copying IMP's class whitelist into Core. That list belongs to the application that defines the classes. The mail application should publish the finished map as an API capability.
Changes
IMP_Flags::msgflags()returns lowercase IMAP keyword to display label forIMP_Flag_Useronly. Built-in flags are omitted, including ones whose color or label was customized and stored in the same preference.IMP_Api::msgflags()delegates to that method. The registry capability ismail/msgflags.Test plan
phpunit test/Imp/Unit/FlagsMsgflagsTest.php— user keyword and label, exclusion of\answered, API delegation and method registrationmail/msgflagsreturns its keyword and label\answeredis absent from the map