mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 20:41:24 +08:00
DEV: Improve support for extending flags. (#8619)
- Ensure that the 'notify_moderators' flag is always the last flag when using custom flags. - Support passign a custom FlagSettings object when replacing flags to reuse existing ones.
This commit is contained in:
@ -127,8 +127,7 @@ class Plugin::Instance
|
||||
end
|
||||
|
||||
# Applies to all sites in a multisite environment. Ignores plugin.enabled?
|
||||
def replace_flags
|
||||
settings = ::FlagSettings.new
|
||||
def replace_flags(settings: ::FlagSettings.new)
|
||||
yield settings
|
||||
|
||||
reloadable_patch do |plugin|
|
||||
|
Reference in New Issue
Block a user