mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-28 18:14:08 +08:00
Update folderId => folderImapUID, rename messageI to uid
This commit is contained in:
parent
b033b94091
commit
a1419a65a5
2 changed files with 6 additions and 6 deletions
|
@ -73,21 +73,21 @@ class IMAPBox {
|
|||
})
|
||||
}
|
||||
|
||||
fetchStream({messageId, options}) {
|
||||
if (!messageId) {
|
||||
throw new Error("IMAPConnection.fetchStream requires a message identifier.")
|
||||
fetchStream({uid, options}) {
|
||||
if (!uid) {
|
||||
throw new Error("IMAPConnection.fetchStream requires a message uid.")
|
||||
}
|
||||
if (!options) {
|
||||
throw new Error("IMAPConnection.fetchStream requires an options object.")
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
const f = this._imap.fetch(messageId, options);
|
||||
const f = this._imap.fetch(uid, options);
|
||||
f.on('message', (imapMessage) => {
|
||||
imapMessage.on('body', (stream) => {
|
||||
resolve(stream)
|
||||
})
|
||||
})
|
||||
f.once('error', (error) => reject)
|
||||
f.once('error', reject)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ module.exports = (sequelize, Sequelize) => {
|
|||
return message.getFolder()
|
||||
.then((folder) => connection.openBox(folder.name))
|
||||
.then((imapBox) => imapBox.fetchStream({
|
||||
messageId: message.folderUID,
|
||||
uid: message.folderImapUID,
|
||||
options: {
|
||||
bodies: [this.partId],
|
||||
struct: true,
|
||||
|
|
Loading…
Reference in a new issue