mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-12 04:25:31 +08:00
18 lines
481 B
JavaScript
18 lines
481 B
JavaScript
const SyncbackTask = require('./syncback-task')
|
|
const TaskHelpers = require('./task-helpers')
|
|
|
|
class StarMessageIMAP extends SyncbackTask {
|
|
description() {
|
|
return `StarMessage`;
|
|
}
|
|
|
|
run(db, imap) {
|
|
const messageId = this.syncbackRequestObject().props.messageId
|
|
|
|
return TaskHelpers.openMessageBox({messageId, db, imap})
|
|
.then(({box, message}) => {
|
|
return box.addFlags(message.folderImapUID, 'FLAGGED')
|
|
})
|
|
}
|
|
}
|
|
module.exports = StarMessageIMAP;
|