-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
Why?
Current problem: The needs-action label is hard-coded
private static final String NEEDS_ACTION = "needs-action";
Problems identified: Different use cases may require different system labels and needs (e.g., "promotion", "social", "to-do") => needs action is not the only possible scenario.
Also system administrators should be able to control system labels without modifying the code
What?
We want to make system labels configurable through the application configuration file, not hard-coded.
Goal: Configuration-driven system labels
- Define system labels in listeners.xml configuration
- Support multiple system labels (not just needs-action)
- Each system label has: id, displayName, color, description
We also want to have clear separation between:
- System labels: Configured in listeners.xml (managed by admins)
- User labels: Stored in database (managed by users via JMAP)
System labels are configuration and they should not be stored in database
Example:
<listener>
<class>com.linagora.tmail.listener.rag.LlmMailClassifierListener</class>
<configuration>
....
<systemLabels>
<label>
<id>needs-action</id>
<displayName>Needs Action</displayName>
<color>#FF6B6B</color>
<description>Email requires the recipient to take action: answer a question, make a decision, complete a task, handle a request, or respond by a deadline.</description>
</label>
<label>
<id>promotional</id>
<displayName>Promotional</displayName>
<color>#4ECDC4</color>
<description>Marketing, newsletters, announcements, or promotional content.</description>
</label>
</systemLabels>
</configuration>
</listener>
How:
- Create SystemLabel record that create systemLabel from configuration and can turn it into an actual Label .
- Label ID validation should include both user and system labels before being added as a flag.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels