wait 2 minutes before mailing out new comments to allow edits
This commit is contained in:
parent
6b17bbd9a5
commit
fce8c73fda
|
@ -120,6 +120,11 @@ last_comment_id = (Keystore.value_for(LAST_COMMENT_KEY) ||
|
|||
|
||||
Comment.where("id > ? AND (is_deleted = ? AND is_moderated = ?)",
|
||||
last_comment_id, false, false).order(:id).each do |c|
|
||||
# allow some time for newer comments to be edited before sending them out
|
||||
if (Time.now - c.created_at) < 2.minutes
|
||||
break
|
||||
end
|
||||
|
||||
mailing_list_users.each do |u|
|
||||
if (c.story.tags.map{|t| t.id } & u.tag_filters.map{|t| t.tag_id }).any?
|
||||
next
|
||||
|
|
Loading…
Reference in a new issue