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:
parent
35ff5d6796
commit
3964929c75
2 changed files with 12 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue