mirror of
https://github.com/discourse/discourse-solved.git
synced 2025-07-04 04:42:12 +00:00
FIX: compatibility after allowlist rewording in Discourse
This commit is contained in:
parent
075883ba5a
commit
10c31ffbd5
12
plugin.rb
12
plugin.rb
@ -250,8 +250,16 @@ SQL
|
||||
mount ::DiscourseSolved::Engine, at: "solution"
|
||||
end
|
||||
|
||||
TopicView.add_post_custom_fields_whitelister do |user|
|
||||
["is_accepted_answer"]
|
||||
|
||||
# TODO Drop after Discourse 2.6.0 release
|
||||
if TopicView.respond_to?(:add_post_custom_fields_whitelister)
|
||||
TopicView.add_post_custom_fields_whitelister do |user|
|
||||
["is_accepted_answer"]
|
||||
end
|
||||
else
|
||||
TopicView.add_post_custom_fields_allowlister do |user|
|
||||
["is_accepted_answer"]
|
||||
end
|
||||
end
|
||||
|
||||
def get_schema_text(post)
|
||||
|
Loading…
x
Reference in New Issue
Block a user