mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: log reason staff auto blocks a user
This commit is contained in:
@@ -104,8 +104,10 @@ class NewPostManager
|
||||
|
||||
result = manager.enqueue('default')
|
||||
|
||||
if is_fast_typer?(manager) || matches_auto_block_regex?(manager)
|
||||
UserBlocker.block(manager.user, Discourse.system_user, keep_posts: true)
|
||||
if is_fast_typer?(manager)
|
||||
UserBlocker.block(manager.user, Discourse.system_user, keep_posts: true, reason: I18n.t("user.new_user_typed_too_fast"))
|
||||
elsif matches_auto_block_regex?(manager)
|
||||
UserBlocker.block(manager.user, Discourse.system_user, keep_posts: true, reason: I18n.t("user.content_matches_auto_block_regex"))
|
||||
end
|
||||
|
||||
result
|
||||
|
||||
Reference in New Issue
Block a user