FEATURE: new fast_typing_threshold site setting (#30865)

Rename `min_first_post_typing_time` to `fast_typing_threshold` and
provide admin 4 options:
- disabled
- low - 1 second
- standard - 3 seconds
- high - 5 seconds

Related PRs:
- https://github.com/discourse/discourse-zoom/pull/112
This commit is contained in:
Krzysztof Kotlarek
2025-01-28 09:53:03 +11:00
committed by GitHub
parent b4130a76ad
commit cfcc60f847
8 changed files with 60 additions and 10 deletions

View File

@ -897,7 +897,7 @@ RSpec.describe PostsController do
include_examples "action requires login", :post, "/posts.json"
before do
SiteSetting.min_first_post_typing_time = 0
SiteSetting.fast_typing_threshold = "disabled"
SiteSetting.whispers_allowed_groups = "#{Group::AUTO_GROUPS[:staff]}"
end
@ -1155,11 +1155,11 @@ RSpec.describe PostsController do
context "when fast typing" do
before do
SiteSetting.min_first_post_typing_time = 3000
SiteSetting.fast_typing_threshold = "standard"
SiteSetting.auto_silence_fast_typers_max_trust_level = 1
end
it "queues the post if min_first_post_typing_time is not met" do
it "queues the post if fast_typing_threshold is not met" do
post "/posts.json",
params: {
raw: "this is the test content",
@ -3094,7 +3094,7 @@ RSpec.describe PostsController do
before do
sign_in(user)
SiteSetting.min_first_post_typing_time = 0
SiteSetting.fast_typing_threshold = "disabled"
end
it "allows strings to be added" do