include retention info in mailboxes list

This commit is contained in:
Andris Reinman 2021-03-26 11:22:50 +02:00
parent f33801aaae
commit 0869d7b391
2 changed files with 7 additions and 0 deletions

View file

@ -5801,6 +5801,9 @@ components:
subscribed:
type: boolean
description: Mailbox subscription status. IMAP clients may unsubscribe from a folder.
retention:
type: number
description: Default retention policy for this mailbox (in ms). If set then messages added to this maibox will be automatically deleted after retention time.
hidden:
type: boolean
description: Is the folder hidden or not

View file

@ -190,6 +190,10 @@ module.exports = (db, server, mailboxHandler) => {
hidden: !mailboxData.hidden
};
if (mailboxData.retention) {
response.retention = mailboxData.retention;
}
if (sizeValues) {
for (let sizeValue of sizeValues) {
if (mailboxData._id.equals(sizeValue._id)) {