mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +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:
@ -301,9 +301,7 @@ module Chat
|
||||
end
|
||||
|
||||
def channel_hashtag_or_name
|
||||
if chat_channel.slug.present? && SiteSetting.enable_experimental_hashtag_autocomplete
|
||||
return "##{chat_channel.slug}::channel"
|
||||
end
|
||||
return "##{chat_channel.slug}::channel" if chat_channel.slug.present?
|
||||
chat_channel_title
|
||||
end
|
||||
end
|
||||
|
@ -3,7 +3,7 @@
|
||||
module Chat
|
||||
class ChannelHashtagDataSource
|
||||
def self.enabled?
|
||||
SiteSetting.enable_experimental_hashtag_autocomplete && SiteSetting.enable_public_channels
|
||||
SiteSetting.enable_public_channels
|
||||
end
|
||||
|
||||
def self.icon
|
||||
|
Reference in New Issue
Block a user