From 668ea21131f3e2dc2386044ea2659aa0687a3cb2 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Thu, 28 Oct 2021 15:13:24 +0200 Subject: [PATCH] DEV: Drop obsolete code (#170) --- plugin.rb | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/plugin.rb b/plugin.rb index ab2269d..1af9bec 100644 --- a/plugin.rb +++ b/plugin.rb @@ -256,16 +256,7 @@ SQL mount ::DiscourseSolved::Engine, at: "solution" end - # TODO Drop after Discourse 2.6.0 release - if TopicView.respond_to?(:add_post_custom_fields_allowlister) - TopicView.add_post_custom_fields_allowlister do |user| - ["is_accepted_answer"] - end - else - TopicView.add_post_custom_fields_whitelister do |user| - ["is_accepted_answer"] - end - end + topic_view_post_custom_fields_allowlister { ["is_accepted_answer"] } def get_schema_text(post) post.excerpt(nil, keep_onebox_body: true).presence || post.excerpt(nil, keep_onebox_body: true, keep_quotes: true)