mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-13 03:29:46 +08:00
16 lines
448 B
JavaScript
16 lines
448 B
JavaScript
/**
|
|
* Given a `SyncbackRequestObject` it creates the appropriate syncback task.
|
|
*
|
|
*/
|
|
class SyncbackTaskFactory {
|
|
static create(account, syncbackRequest) {
|
|
if (syncbackRequest.type === "MoveToFolder") {
|
|
// TODO: Know it's IMAP from the account object.
|
|
const Task = require('./syncback_tasks/move-to-folder.imap');
|
|
return new Task(account, syncbackRequest)
|
|
}
|
|
return null
|
|
}
|
|
}
|
|
|
|
module.exports = SyncbackTaskFactory
|