1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00

Update 61-email.js (#689)

Fixed disposition issue caused by `this`.
This commit is contained in:
Vincent Hou 2020-09-23 15:35:08 +08:00 committed by GitHub
parent fbad6e4c2d
commit 606f9c71e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -414,9 +414,9 @@ module.exports = function(RED) {
s = false; s = false;
setInputRepeatTimeout(); setInputRepeatTimeout();
}; };
if (this.disposition === "Delete") { if (node.disposition === "Delete") {
imap.addFlags(results, "\Deleted", cleanup); imap.addFlags(results, "\Deleted", cleanup);
} else if (this.disposition === "Read") { } else if (node.disposition === "Read") {
imap.addFlags(results, "\Seen", cleanup); imap.addFlags(results, "\Seen", cleanup);
} else { } else {
cleanup(); cleanup();