mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:21:18 +08:00
FIX: email replies to closed topic should not be accepted
This commit is contained in:
@ -15,6 +15,7 @@ module Email
|
||||
class UserNotFoundError < ProcessingError; end
|
||||
class UserNotSufficientTrustLevelError < ProcessingError; end
|
||||
class BadDestinationAddress < ProcessingError; end
|
||||
class TopicClosedError < ProcessingError; end
|
||||
class EmailLogNotFound < ProcessingError; end
|
||||
class InvalidPost < ProcessingError; end
|
||||
|
||||
@ -68,6 +69,7 @@ module Email
|
||||
@email_log = dest_info[:obj]
|
||||
|
||||
raise EmailLogNotFound if @email_log.blank?
|
||||
raise TopicClosedError if Topic.find_by_id(@email_log.topic_id).closed?
|
||||
|
||||
create_reply
|
||||
end
|
||||
|
Reference in New Issue
Block a user