Long threads (more than 20 messages) only displayed the first 20 messages
because the MessageViewSet used the default PAGE_SIZE of 20. The frontend
doesn't handle pagination for messages, so additional messages were silently
hidden from users.
This fix disables pagination for the messages endpoint since threads typically
don't have enough messages to require pagination.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Adds new config vars for incoming & outgoing attachment sizes, validated at draft stage
and when receiving emails.
---------
Co-authored-by: Riël Notermans <riel@mosa.cloud>
We recently display recipient delivery status tooltip when the message is not
yet delivered or in failure. To help user to understand why the message is not
delivered, we now display the delivery message if there is one.
- Updated Message API to return MessageRecipient instead of Contact
- In ThreadMessage component displays icon next to a recipient to display
delivered status (only if the message is not delivered yet)
- Added multipart upload capabilities for EML and MBOX files to the
message imports bucket.
- Introduced new API endpoints for initiating uploads, completing
uploads, and aborting uploads.
- Updated serializers and viewsets to handle file uploads efficiently.
- Improved frontend components to display upload progress and handle
file uploads seamlessly.
- Adjusted backend services to process uploaded files asynchronously,
ensuring better performance and user experience.
- Updated documentation and tests to reflect the new functionality.
Allow a user to ask to send a message then immediately archive
the related thread. For new message, it is not allowed to archive the thread.
Furthermore, the user can choose to use by default the send and archive action.
We want to be able to archive threads. So we update Thread model to know
if the thread is archived according to its messages state. Then update the
flag endpoint api to archive messages or threads. Also update the search indexer
to be able to search within archived threads. And finally update the frontend to
allow the user to archive a thread, get and search in archived threads.
- Allow to create and manage signature in admin interface
- Allow to insert signature in message editor
- Blob model must have at least a mailbox or maildomain
This commit introduces a complete email template system with support
for both HTML and text content, flexible relationships with mailboxes
and mail domains, and a RESTful API for template management.
This PR adds a new build system for embeddable widgets and a first implementation of a "Feedback" popup widget.
It also refactors inbound message routes into channels, of which there are 2 for now: MTA (by default) and Widget. More to come!
Currently the endpoint to search users is nested under maildomain. So since we
add the new endpoint to manage maildomain accesses, we need more granularity
on this endpoint and its current implementation does not allow that. So we move
it into the UserViewset. This endpoint is accessible to superuser and maildomain
admins only. Superusers are allowed to search into the whole user database to
assign any user as maildomain admin while maildomain admin are only allowed to
search users with maildomain or mailbox access in their scope.
Introduce new API endpoints for managing maildomain accesses,
including read, write, and delete operations. Update translations
and UI components to support these features, enhancing the admin
interface for managing user access to maildomains.
Related issue : #327
Only allow patch request to update mailbox then customize serializer to only
update allowed fields and related resources (Contact, User accordingly)
Also update admin frontend to add action to edit a mailbox in the maildomain admin.
Related issue : #328, #327
When a message is received, if the auto labelling feature is enabled,
we try to add all relevant labels that are flagged for auto labelling to this
message.
Co-authored-by: jbpenrath <jb.penrath@gmail.com>
Improve openapi schema to pass abilities to frontend properly.
Then through the useAbility hook, hide/disable actions.
It concerns actions to send messages, write messages, share
thread access, crud labels, crud maildomain mailboxes.
There was an error in the openapi schema and we are not aware that
message.draftBody could be null so when it was the case, the frontend
throws an error when rendering the `MessageForm` component.
User and MailDomain have both `custom_attributes` json field. Those fields
aims to store extra data about those models specific to an instance. In order
to fulfill those fields with consistency and without requiring to fork the
project, we add two new settings `SCHEMA_CUSTOM_ATTRIBUTES_*`.
Those 2 settings expects a JSON Schema string defined through env vars.
Then on model save, those schema are used to validate data saved into
custom attributes.
The OpenAPI Schema does not embedded abilities property.
We fix that and make two serializers for User model in order to get proper
openapi definition for User instance with abilities and without abilities.
We want to add ability to Messages to interop with our Drive application.
First, we want to be able to set the Drive base url through environment
variable then pass down Drive configuration to frontend through the config
api endpoint.
https://github.com/suitenumerique/drive
* ✨(dns) add admin page for DNS records. Fixes#177
* 👷(dockerflow) add a flag to disable Dockerflow
* 💚(ghactions) fix check-api-update that was missing Orval
* 💚(ci) fix tests that depended on Keycloak
* ♻️(admin) refactor CopyableInput into a separate component
* 🎨(dns) improve code style
Enhance the `IntegerChoicesField` to be well interpreted by drf
spectacular to generate a clean OpenAPI Schema then fix Typescript
issues once the api types have been fixed.
- Create user (if needed) and mailbox access on mailbox creation
- If identify provider is keycloak, generate a one time password
at mailbox creation
- At nested endpoint to search users related to a maildomain
Co-authored-by: Sylvain Zimmer <sylvain@sylvainzimmer.com>
We recently display label badges into thread-item. We revamp that
a little bit to improve code structure and prepare the layout
for further improvements.
Add the ability to filter threads by label slug in the thread list endpoint. This feature
enables users to view all threads associated with a specific label.
Changes:
- Add label_slug query parameter to ThreadViewSet list endpoint
- Implement label-based filtering with proper permission checks
- Add OpenAPI documentation for the new label_id parameter
- Add comprehensive test suite for label filtering
Technical details:
- Filter threads by label while ensuring user has access to the label's mailbox
- Support combining label filter with existing filters (mailbox, search, etc.)
- Add proper error handling for invalid or inaccessible labels
- Add test coverage for various filtering scenarios:
- Single label filtering
- Combined label and mailbox filtering
- Invalid label handling
- Permission checks
- Combined filters (label + unread/starred status)
This allows user creation, passwords reset and listing users from
Keycloak, plus a new MailDomainAccess model for admins.
* ✨(admin) add maildomainacess model, api route and backend tests
* ♻️(drf) simplify API code
* ✨(keycloack) add deployable keycloak to PaaS
* ✨(keycloak) add integration via API, upgrade to 26.x
* 🗑️(settings) remove invitation setting
* 🐛(tests) fix failing tests after rebase
* 🚨(all) fix lint
This commit implements a complete label management system with the following features:
- Add CRUD operations for labels with hierarchical support (using slash-based naming)
- Implement label-thread associations (add/remove threads to/from labels)
- Add comprehensive permission checks (ADMIN/EDITOR roles required for management)
- Support hierarchical label structure with automatic parent creation
- Add color customization for labels
- Implement proper slug generation for label names
- Add extensive test coverage for all label operations
Technical details:
- New LabelViewSet with list, create, update, delete operations
- Custom actions for thread management (add-threads, remove-threads)
- Hierarchical label structure with parent-child relationships
- Automatic parent label creation when creating nested labels
- Proper permission handling based on mailbox access roles
- Comprehensive test suite covering all edge cases
- OpenAPI documentation for all endpoints