FIX: default_tags_muted site setting won't have tag ids.

Instead it only have list of tag names separated by comma.
89fcb75af2
This commit is contained in:
Vinoth Kannan 2020-08-26 23:05:29 +05:30
parent ce2491dc2f
commit 618a7ecb35
2 changed files with 3 additions and 2 deletions

View File

@ -917,7 +917,8 @@ class TopicQuery
if user.present?
muted_tag_ids = TagUser.lookup(user, :muted).pluck(:tag_id)
else
muted_tag_ids = SiteSetting.default_tags_muted.split("|").map(&:to_i)
muted_tag_names = SiteSetting.default_tags_muted.split("|")
muted_tag_ids = Tag.where(name: muted_tag_names).pluck(:id)
end
if muted_tag_ids.blank?

View File

@ -286,7 +286,7 @@ describe TopicQuery do
before do
SiteSetting.remove_muted_tags_from_latest = 'always'
SiteSetting.default_tags_muted = tag.id.to_s
SiteSetting.default_tags_muted = tag.name
end
it 'removes default muted tag topics for anonymous users' do