mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-12 12:40:08 +08:00
0fe6343137
Affected collections were categories, contacts, files, messages, and threads.
16 lines
582 B
JavaScript
16 lines
582 B
JavaScript
const Serialization = require('./serialization');
|
|
const {PubsubConnector, MessageTypes} = require('nylas-core')
|
|
|
|
module.exports = {
|
|
createSyncbackRequest: function createSyncbackRequest(request, reply, syncRequestArgs) {
|
|
request.getAccountDatabase().then((db) => {
|
|
db.SyncbackRequest.create(syncRequestArgs).then((syncbackRequest) => {
|
|
PubsubConnector.notifyAccount(db.accountId, {
|
|
type: MessageTypes.SYNCBACK_REQUESTED,
|
|
data: syncbackRequest.id,
|
|
});
|
|
reply(Serialization.jsonStringify(syncbackRequest))
|
|
})
|
|
})
|
|
},
|
|
}
|