From e9b427ff53194c66ba7a741ccb48d511d7049084 Mon Sep 17 00:00:00 2001 From: Martin Brennan Date: Tue, 20 Aug 2024 15:46:07 +1000 Subject: [PATCH] FEATURE: Change default for push_notification_time_window_mins (#28431) Currently the push_notification_time_window_mins is set to 10 minutes by default. We want to change this to 1 minute, which is the delay it has been set to on meta and our internal site already for over a year now. This conforms to the expectation users have that notifications are delivered close to immediately. --- config/site_settings.yml | 2 +- spec/services/post_alerter_spec.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/site_settings.yml b/config/site_settings.yml index 8d7c7747afa..ccd5a440256 100644 --- a/config/site_settings.yml +++ b/config/site_settings.yml @@ -363,7 +363,7 @@ basic: default: true client: true push_notification_time_window_mins: - default: 10 + default: 1 min: 0 short_title: default: "" diff --git a/spec/services/post_alerter_spec.rb b/spec/services/post_alerter_spec.rb index 8651b27adc7..f2b1cdb754d 100644 --- a/spec/services/post_alerter_spec.rb +++ b/spec/services/post_alerter_spec.rb @@ -1360,6 +1360,7 @@ RSpec.describe PostAlerter do end it "delays push notification for active online user" do + SiteSetting.push_notification_time_window_mins = 10 evil_trout.update!(last_seen_at: 5.minutes.ago) expect { mention_post }.to change { Jobs::PushNotification.jobs.count }