tutao / tutanota

Tuta is an email service with a strong focus on security and privacy that lets you encrypt emails, contacts and calendar entries on all your devices.
https://tuta.com
GNU General Public License v3.0
6.12k stars 527 forks source link

Client calls applylabelservice with different mail listIds in single request #8020

Open jomapp opened 12 hours ago

jomapp commented 12 hours ago

Describe the bug Currently the client might send requests to the applylabelservice with multiple different mail listIds in a single request. This is not allowed by the service and leads to a BadRequestException. We need group the request by mail listIds.

To Reproduce Steps to reproduce the behavior:

  1. Find an account that had received mails before being migrated to mailSets
  2. Send new mail to mailbox
  3. Move newly received mail to some custom folder with mails that were already existing pre-migration.
  4. Select multiple mails in the custom folder (pre-migration and new ones)
  5. Apply label
  6. See BadRequestException

Expected behavior No BadRequestException is thrown. Applying labels still works.

Implementation notes The client already supports grouping mails by mail listId. See EditFolderDialog.#getMailIdsGroupedByListId.