mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 14:23:39 +08:00
Don't send an email for a topic that has been deleted
This commit is contained in:
parent
06e5083950
commit
2e8e4b7c6e
|
@ -51,7 +51,11 @@ module Jobs
|
|||
return if seen_recently
|
||||
|
||||
# Load the post if present
|
||||
email_args[:post] ||= notification.post if notification.post.present?
|
||||
if notification.post.present?
|
||||
# Don't email a user if the topic has been deleted
|
||||
return unless notification.post.topic.present?
|
||||
email_args[:post] ||= notification.post
|
||||
end
|
||||
email_args[:notification] = notification
|
||||
|
||||
# Don't send email if the notification this email is about has already been read
|
||||
|
|
Loading…
Reference in New Issue
Block a user