mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Use db schema for tags instead of plugin store and custom fields
This commit is contained in:
@@ -41,6 +41,7 @@ class PostRevisionSerializer < ApplicationSerializer
|
||||
end
|
||||
|
||||
add_compared_field :wiki
|
||||
add_compared_field :tags
|
||||
|
||||
def previous_hidden
|
||||
previous["hidden"]
|
||||
@@ -149,6 +150,10 @@ class PostRevisionSerializer < ApplicationSerializer
|
||||
}
|
||||
end
|
||||
|
||||
def include_tags_changes?
|
||||
SiteSetting.tagging_enabled
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def post
|
||||
@@ -184,6 +189,10 @@ class PostRevisionSerializer < ApplicationSerializer
|
||||
end
|
||||
end
|
||||
|
||||
if SiteSetting.tagging_enabled
|
||||
latest_modifications["tags"] = post.topic.tags.map(&:name)
|
||||
end
|
||||
|
||||
post_revisions << PostRevision.new(
|
||||
number: post_revisions.last.number + 1,
|
||||
hidden: post.hidden,
|
||||
|
||||
Reference in New Issue
Block a user