FIX: remove unnecessary OR from dismiss service (#12117)

Quick fix after https://github.com/discourse/discourse/pull/12103
This commit is contained in:
Krzysztof Kotlarek 2021-02-18 14:55:58 +11:00 committed by GitHub
parent d628c65af0
commit 2f4630742c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ class DismissTopics
@rows ||= @topics_scope
.joins("LEFT JOIN topic_users ON topic_users.topic_id = topics.id AND topic_users.user_id = #{@user.id}")
.where("topics.created_at >= ?", since_date)
.where("topic_users.id IS NULL OR topic_users.last_read_post_number IS NULL")
.where("topic_users.last_read_post_number IS NULL")
.where("topics.archetype <> ?", Archetype.private_message)
.order("topics.created_at DESC")
.limit(SiteSetting.max_new_topics).map do |topic|