adjust qurey to include messages, once everything is read

then mark first_topic_unread_at to be current time
This commit is contained in:
Sam Saffron
2017-05-25 18:40:32 -04:00
parent 1a1f5d2101
commit 7d59ff67b8
2 changed files with 4 additions and 4 deletions

View File

@@ -20,8 +20,8 @@ SQL
THEN topics.highest_staff_post_number
ELSE topics.highest_post_number
END
AND topics.deleted_at IS NULL AND topics.archetype <> 'private_message'
), 'epoch')
AND topics.deleted_at IS NULL
), current_timestamp)
SQL
add_index :topics, [:last_unread_at]