mirror of
https://github.com/documenso/documenso.git
synced 2026-08-25 07:42:28 +10:00
fix: add email disable flag (#2931)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user