FIX: ensure 'notifications_state' is up to date after creating a notification

This commit is contained in:
Régis Hanol
2018-05-26 02:09:48 +02:00
parent cc0a5f4526
commit f988fa31aa
6 changed files with 61 additions and 66 deletions

View File

@@ -30,7 +30,7 @@ class PostJobsEnqueuer
post_id: @post.id,
new_record: true,
options: @opts[:post_alert_options],
)
)
end
def feature_topic_users
@@ -45,10 +45,9 @@ class PostJobsEnqueuer
TopicTrackingState.publish_unread(@post) if @post.post_number > 1
TopicTrackingState.publish_latest(@topic, @post.whisper?)
Jobs.enqueue_in(
SiteSetting.email_time_window_mins.minutes,
:notify_mailing_list_subscribers,
post_id: @post.id
Jobs.enqueue_in(SiteSetting.email_time_window_mins.minutes,
:notify_mailing_list_subscribers,
post_id: @post.id,
)
end