From 2f34ae57782fe0fe0343413dc37473af34b24280 Mon Sep 17 00:00:00 2001 From: Krzysztof Kotlarek Date: Mon, 27 Jul 2020 11:55:02 +1000 Subject: [PATCH] FIX: check if allow_staff_user_custom_field exisits --- plugin.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin.rb b/plugin.rb index a54aee6..c7754c9 100644 --- a/plugin.rb +++ b/plugin.rb @@ -201,10 +201,10 @@ after_initialize do end # TODO Drop after Discourse 2.6.0 release - if respond_to?(:whitelist_staff_user_custom_field) - whitelist_staff_user_custom_field(COUNT_FIELD) - else + if respond_to?(:allow_staff_user_custom_field) allow_staff_user_custom_field(COUNT_FIELD) + else + whitelist_staff_user_custom_field(COUNT_FIELD) end add_to_class(Guardian, :can_delete_user_notes?) do