mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
Don't send an email for a topic that has been deleted
This commit is contained in:
parent
06e5083950
commit
2e8e4b7c6e
1 changed files with 5 additions and 1 deletions
|
@ -51,7 +51,11 @@ module Jobs
|
||||||
return if seen_recently
|
return if seen_recently
|
||||||
|
|
||||||
# Load the post if present
|
# 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
|
email_args[:notification] = notification
|
||||||
|
|
||||||
# Don't send email if the notification this email is about has already been read
|
# Don't send email if the notification this email is about has already been read
|
||||||
|
|
Loading…
Reference in a new issue