fix: add email disable flag (#2931)

This commit is contained in:
David Nguyen
2026-06-05 17:55:10 +10:00
committed by GitHub
parent 0ecde7ac1e
commit ebf5b75a19
19 changed files with 116 additions and 198 deletions
@@ -99,7 +99,7 @@ export const run = async ({ payload, io }: { payload: TSendSigningEmailJobDefini
replyToEmail,
organisationId,
claims,
isOrganisationOwnerDisabled,
emailsDisabled,
} = await getEmailContext({
emailType: 'RECIPIENT',
source: {
@@ -109,8 +109,8 @@ export const run = async ({ payload, io }: { payload: TSendSigningEmailJobDefini
meta: envelope.documentMeta,
});
// Don't send signing invitations on behalf of a disabled (e.g. banned) account.
if (envelope.user.disabled || isOrganisationOwnerDisabled) {
// Don't send signing invitations if the organisation has email sending disabled or the owner is disabled (e.g. banned).
if (envelope.user.disabled || emailsDisabled) {
return;
}