mirror of
https://github.com/bulwarkmail/webmail.git
synced 2026-10-31 08:13:50 +00:00
Mail sent from a group or shared identity (team@example.org) is created in that account, together with its submission, on Stalwart 0.16 and 1.0 alike. Undo send and "Cancel and edit" cancelled the submission there, but then put the message back in Drafts, read it back and later removed it through the user's own account. Email ids repeat across accounts - on the test servers a new team message and a message in userb's inbox were both `iaaaaac` - so an unrelated own message was moved to Drafts, opened in the composer and destroyed on Discard, while the undone message stayed in the group's Sent. The account the message was sent from now travels with it: - `restoreEmailToDraft` takes the account, the store looks up that account's Drafts by role, and the restored draft is read from there - the composer keeps the draft's account (`draftAccountId`); saving, sending and discarding remove the old version in that account, and the first save moves the draft to the own Drafts, where drafts are saved - discarding goes through the login the draft was saved with, as the send does (#461) - "Edit draft" on a message in a shared or group folder, in the standard and the Pro views, opens it with that folder's account, so a draft left in the group's Drafts is not removed by id in the own account either - S/MIME copies, and the unused `cancelScheduledEmail`, are deleted in the submission's account