2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-05 08:59:27 +08:00

FIX: digest emails should not include posts that are still in the edit grace period

This commit is contained in:
Neil Lalonde 2017-08-14 12:47:33 -04:00
parent 89e919ec42
commit 94d8f6d734
5 changed files with 148 additions and 117 deletions

View file

@ -337,6 +337,7 @@ class Topic < ActiveRecord::Base
.where(closed: false, archived: false)
.where("COALESCE(topic_users.notification_level, 1) <> ?", TopicUser.notification_levels[:muted])
.created_since(since)
.where('topics.created_at < ?', (SiteSetting.editing_grace_period || 0).seconds.ago)
.listable_topics
.includes(:category)