Skip to content

Commit

Permalink
Recognize boxes named Archive(s) as special boxes
Browse files Browse the repository at this point in the history
  • Loading branch information
ltgorm authored and nifgraup committed Jun 28, 2024
1 parent 1bf121d commit e5a39f3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/special-use-unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,13 @@ describe('checkSpecialUse', () => {
name: 'Praht'
})).to.equal('\\All')
})

it('should return an Archive flag on finding box named Archive or Archives', () => {
expect(checkSpecialUse({
name: 'Archive'
})).to.equal('\\Archive')
expect(checkSpecialUse({
name: 'Archives'
})).to.equal('\\Archive')
})
})
5 changes: 4 additions & 1 deletion src/special-use.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ const SPECIAL_USE_BOXES = {
'սևագրեր', 'טיוטות', 'مسودات', 'مسودات', 'موسودې', 'پیش نویسها', 'ڈرافٹ/', 'ड्राफ़्ट', 'प्रारूप', 'খসড়া', 'খসড়া', 'ড্ৰাফ্ট', 'ਡ੍ਰਾਫਟ', 'ડ્રાફ્ટસ',
'ଡ୍ରାଫ୍ଟ', 'வரைவுகள்', 'చిత్తు ప్రతులు', 'ಕರಡುಗಳು', 'കരടുകള്‍', 'කෙටුම් පත්', 'ฉบับร่าง', 'მონახაზები', 'ረቂቆች', 'សារព្រាង', '下書き', '草稿',
'草稿', '草稿', '임시 보관함'
]
],
// The \Archive flag is rarely used by major email providers so we also check the path.
// Thunderbird names them Archives instead of Archive.
'\\Archive': ['archive', 'archives']
}
const SPECIAL_USE_BOX_FLAGS = Object.keys(SPECIAL_USE_BOXES)

Expand Down

0 comments on commit e5a39f3

Please sign in to comment.