fix newsletter dir not saved correctly

This commit is contained in:
Hongbo Wu
2024-04-24 21:10:13 +08:00
parent 590afa6ee7
commit 0c0a95a79c
2 changed files with 3 additions and 4 deletions

View File

@ -114,7 +114,9 @@ export const saveEmail = async (
labelNames: labels.map((label) => label.name),
itemLanguage: parseResult.parsedContent?.language,
directionality:
(parseResult.parsedContent?.dir as DirectionalityType) || undefined,
parseResult.parsedContent?.dir?.toLowerCase() === 'rtl'
? DirectionalityType.RTL
: DirectionalityType.LTR, // default to LTR
},
input.userId
)

View File

@ -59,9 +59,6 @@ const getAttempts = (job: SavePageJob): number => {
const getOpts = (job: SavePageJob): BulkJobOptions => {
return {
jobId: `${JOB_NAME}_${job.userId}_${job.data.finalUrl}`, // make sure we don't have duplicate jobs
removeOnComplete: true,
removeOnFail: true,
attempts: getAttempts(job),
priority: getPriority(job),
backoff: {