mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 03:56:21 +08:00
DEV: Remove enable_experimental_hashtag_autocomplete logic (#22820)
This commit removes any logic in the app and in specs around enable_experimental_hashtag_autocomplete and deletes some old category hashtag code that is no longer necessary. It also adds a `slug_ref` category instance method, which will generate a reference like `parent:child` for a category, with an optional depth, which hashtags use. Also refactors PostRevisor which was using CategoryHashtagDataSource directly which is a no-no. Deletes the old hashtag markdown rule as well.
This commit is contained in:
@ -160,18 +160,14 @@ class PostRevisor
|
||||
user,
|
||||
I18n.t(
|
||||
"topic_category_changed",
|
||||
from: category_name_raw(old_category),
|
||||
to: category_name_raw(new_category),
|
||||
from: "##{old_category.slug_ref}",
|
||||
to: "##{new_category.slug_ref}",
|
||||
),
|
||||
post_type: Post.types[:small_action],
|
||||
action_code: "category_changed",
|
||||
)
|
||||
end
|
||||
|
||||
def self.category_name_raw(category)
|
||||
"##{CategoryHashtagDataSource.category_to_hashtag_item(category).ref}"
|
||||
end
|
||||
|
||||
def self.create_small_action_for_tag_changes(topic:, user:, added_tags:, removed_tags:)
|
||||
return if !SiteSetting.create_post_for_category_and_tag_changes
|
||||
|
||||
|
Reference in New Issue
Block a user