Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
Fixed bug with markSeen not correctly updating messages.
  • Loading branch information
Jake Stubbs committed Jul 28, 2013
1 parent 85542c6 commit 9581b61
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
8 changes: 4 additions & 4 deletions dist/mail.listener.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions src/mail.listener.coffee
Expand Up @@ -53,11 +53,10 @@ class MailListener extends EventEmitter
if Array.isArray(searchResults) and searchResults.length == 0
return
# 5. fetch emails
params = {}
if @markSeen
params.markSeen = true
markSeen = true

fetch = @imap.fetch(searchResults, { bodies: '' })
fetch = @imap.fetch(searchResults, { bodies: '', markSeen: markSeen })
# 6. email was fetched. Parse it!
fetch.on "message", (msg, id) =>
parser = new MailParser
Expand Down

0 comments on commit 9581b61

Please sign in to comment.