mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FIX: If there is an exception when parsing one email, don't stop all
work, return an error code and continue.
This commit is contained in:
@ -6,7 +6,7 @@ module Email
|
||||
class Receiver
|
||||
|
||||
def self.results
|
||||
@results ||= Enum.new(:unprocessable, :missing, :processed)
|
||||
@results ||= Enum.new(:unprocessable, :missing, :processed, :error)
|
||||
end
|
||||
|
||||
attr_reader :body, :reply_key, :email_log
|
||||
@ -46,6 +46,8 @@ module Email
|
||||
create_reply
|
||||
|
||||
Email::Receiver.results[:processed]
|
||||
rescue
|
||||
Email::Receiver.results[:error]
|
||||
end
|
||||
|
||||
private
|
||||
|
Reference in New Issue
Block a user