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:
@@ -108,9 +108,9 @@ export const run = async ({ payload, io }: { payload: TProcessSigningReminderJob
|
||||
organisationType,
|
||||
senderEmail,
|
||||
replyToEmail,
|
||||
isOrganisationOwnerDisabled,
|
||||
organisationId,
|
||||
claims,
|
||||
emailsDisabled,
|
||||
} = await getEmailContext({
|
||||
emailType: 'RECIPIENT',
|
||||
source: {
|
||||
@@ -120,9 +120,10 @@ export const run = async ({ payload, io }: { payload: TProcessSigningReminderJob
|
||||
meta: envelope.documentMeta,
|
||||
});
|
||||
|
||||
// Don't send reminders on behalf of a disabled (e.g. banned) account.
|
||||
if (envelope.user.disabled || isOrganisationOwnerDisabled) {
|
||||
io.logger.info(`Envelope ${envelope.id} owner is disabled, skipping reminder`);
|
||||
// Don't send reminders if the owner is disabled (e.g. banned) or the organisation
|
||||
// has email sending disabled.
|
||||
if (envelope.user.disabled || emailsDisabled) {
|
||||
io.logger.info(`Envelope ${envelope.id} skipping reminder: owner disabled or organisation emails disabled`);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user