mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-12 19:23:13 +08:00
15 lines
367 B
JavaScript
15 lines
367 B
JavaScript
const SyncbackTask = require('./syncback-task')
|
|
|
|
class DeleteFolderIMAP extends SyncbackTask {
|
|
description() {
|
|
return `DeleteFolder`;
|
|
}
|
|
|
|
run(db, imap) {
|
|
const folderId = this.syncbackRequestObject().props.id
|
|
return db.Folder.findById(folderId).then((folder) => {
|
|
return imap.delBox(folder.name);
|
|
})
|
|
}
|
|
}
|
|
module.exports = DeleteFolderIMAP
|