Skip to content
Merged
1 change: 1 addition & 0 deletions packages/worker/src/email/inbound-effects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ export async function processInboundDeliveryEffects(
return await withAccountWriteLease({
db: input.env.APP_DB,
stableUserId: input.userId,
env: input.env,
write: async () =>
await processUserInboundDeliveryEffectsWithLeaseHeld(input),
})
Expand Down
1 change: 1 addition & 0 deletions packages/worker/src/email/inbound.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ export async function handleInboundEmail(
return await withAccountWriteLease({
db: env.APP_DB,
stableUserId: userId,
env,
async write() {
await assertUserEmailGraphAuthority({
db: env.APP_DB,
Expand Down
1 change: 1 addition & 0 deletions packages/worker/src/email/outbound.ts
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,7 @@ export async function sendOutboundEmail(
? await withAccountWriteLease({
db: input.env.APP_DB,
stableUserId: input.userId,
env: input.env,
write,
})
: await write()
Expand Down
1 change: 1 addition & 0 deletions packages/worker/src/email/reconcile-inbound-deliveries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ export async function sweepStaleInboundDeliveries(input: {
: await withAccountWriteLease({
db: input.env.APP_DB,
stableUserId: userId,
env: input.env,
write: reconcileUser,
})
recovered += result.recovered
Expand Down
Loading