From eac6539c46d08579a03e1f9602b33c68f8dda6b4 Mon Sep 17 00:00:00 2001 From: Mark VanLandingham Date: Thu, 24 Jun 2021 01:41:51 -0500 Subject: [PATCH] FIX: Backwards compatibility for older Discourse versions (#143) --- plugin.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin.rb b/plugin.rb index 1173bcd..6d825be 100644 --- a/plugin.rb +++ b/plugin.rb @@ -634,7 +634,9 @@ SQL AND di.period_type = :period_type AND di.solutions <> x.solutions " - add_directory_column("solutions", query: query) + if respond_to?(:add_directory_column) + add_directory_column("solutions", query: query) + end add_to_class(:composer_messages_finder, :check_topic_is_solved) do return if !SiteSetting.solved_enabled || SiteSetting.disable_solved_education_message