deleted topics get no notifications

This commit is contained in:
Sam 2013-04-18 10:00:55 +10:00
parent 6974ad487c
commit 723df0b964
1 changed files with 3 additions and 0 deletions

View File

@ -27,6 +27,9 @@ module Jobs
post = Post.where(id: args[:post_id]).first
return unless post.present?
# Topic may be deleted
return unless post.topic
# Don't email posts that were deleted
return if post.user_deleted?