mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-14 13:44:41 +08:00
18 lines
487 B
JavaScript
18 lines
487 B
JavaScript
const SyncbackTask = require('./syncback-task')
|
|
const TaskHelpers = require('./task-helpers')
|
|
|
|
class UnstarMessageIMAP extends SyncbackTask {
|
|
description() {
|
|
return `UnstarMessage`;
|
|
}
|
|
|
|
run(db, imap) {
|
|
const messageId = this.syncbackRequestObject().props.messageId
|
|
|
|
return TaskHelpers.openMessageBox({messageId, db, imap})
|
|
.then(({box, message}) => {
|
|
return box.delFlags(message.folderImapUID, 'FLAGGED')
|
|
})
|
|
}
|
|
}
|
|
module.exports = UnstarMessageIMAP;
|