2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-05 08:59:27 +08:00

FIX: summary email excludes all untagged topics if user has muted some tags

This commit is contained in:
Neil Lalonde 2017-07-04 12:51:57 -04:00
parent 35ff5d6796
commit 3964929c75
2 changed files with 12 additions and 1 deletions

View file

@ -373,7 +373,7 @@ class Topic < ActiveRecord::Base
muted_tag_ids = TagUser.lookup(user, :muted).pluck(:tag_id)
unless muted_tag_ids.empty?
topics = topics.joins("LEFT OUTER JOIN topic_tags ON topic_tags.topic_id = topics.id")
.where("topic_tags.tag_id NOT IN (?)", muted_tag_ids)
.where("topic_tags.tag_id NOT IN (?) OR topic_tags.tag_id is null", muted_tag_ids)
end
topics