mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-09-22 00:06:06 +08:00
fix(message-bodies): Ensure each message body is processed
Relevant for #436
This commit is contained in:
parent
d1e9b93b64
commit
d437e6866f
|
@ -24,7 +24,7 @@ class MessageBodyProcessor
|
|||
# optimistically display the message before the latest changes
|
||||
# persisted.
|
||||
_key: (message) ->
|
||||
return crypto.createHash('md5').update(message.body).digest('hex')
|
||||
return message.id + crypto.createHash('md5').update(message.body ? "").digest('hex')
|
||||
|
||||
version: ->
|
||||
@_version
|
||||
|
@ -38,6 +38,8 @@ class MessageBodyProcessor
|
|||
|
||||
process: (message) =>
|
||||
body = message.body
|
||||
return "" unless body
|
||||
|
||||
key = @_key(message)
|
||||
if @_recentlyProcessedD[key]
|
||||
return @_recentlyProcessedD[key].body
|
||||
|
|
Loading…
Reference in a new issue