mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 01:31:35 +08:00
FIX: Specific email error for replies to digest emails (#9770)
This commit is contained in:

committed by
GitHub

parent
42e5a5bb39
commit
a047004c9a
@ -66,6 +66,7 @@ module Email
|
||||
when Discourse::InvalidAccess then :email_reject_invalid_access
|
||||
when Email::Receiver::OldDestinationError then :email_reject_old_destination
|
||||
when Email::Receiver::ReplyNotAllowedError then :email_reject_reply_not_allowed
|
||||
when Email::Receiver::ReplyToDigestError then :email_reject_reply_to_digest
|
||||
else :email_reject_unrecognized_error
|
||||
end
|
||||
|
||||
|
@ -32,6 +32,7 @@ module Email
|
||||
class UnsubscribeNotAllowed < ProcessingError; end
|
||||
class EmailNotAllowed < ProcessingError; end
|
||||
class OldDestinationError < ProcessingError; end
|
||||
class ReplyToDigestError < ProcessingError; end
|
||||
|
||||
attr_reader :incoming_email
|
||||
attr_reader :raw_email
|
||||
@ -190,6 +191,7 @@ module Email
|
||||
end
|
||||
end
|
||||
|
||||
raise ReplyToDigestError if EmailLog.where(email_type: "digest", message_id: @mail.in_reply_to).exists?
|
||||
raise BadDestinationAddress
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user