mirror of
https://github.com/bulwarkmail/webmail.git
synced 2026-10-31 16:13:15 +00:00
Message ids repeat across accounts, so a hook payload naming only an emailId could not tell a plugin which mailbox the message lies in when it is a shared or group account's. onBeforeEmailStarToggle and onEmailStarToggle now carry accountId when the starred message is not in the user's own account, as the message-row-actions click context does. Every star (the row's button, the reader's star, the key, the menu) goes through toggleStar, one message at a time, so one accountId names it; the account is resolved before the plugins are asked. An own message's payload is unchanged. onAfterEmailSend now carries accountId, the JMAP account the sent message lies in (a mail sent from a shared or group identity lies in that account), so api.email.get finds it. sendEmail returns that account as emailAccountId, the S/MIME send too. The hook also carries composerId, the id the sending composer's slots and actions gave plugins, so a plugin can act on what the user chose in that composer.