Merge pull request #3860 from omnivore-app/fix/newsletter-dir

fix newsletter dir not saved correctly
This commit is contained in:
Hongbo Wu 2024-04-24 21:26:50 +08:00 committed by GitHub
commit 4c14e08f29
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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: {