FIX: "Dismiss Posts" corrupting read state

REFACTOR: seen_post_count was a bad name, renamed to highest_seen_post_number
This commit is contained in:
Sam
2014-10-31 09:40:35 +11:00
parent fb69690a4f
commit 2251877332
12 changed files with 46 additions and 36 deletions

View File

@ -22,7 +22,7 @@ class TopicsBulkAction
def dismiss_posts
sql = "
UPDATE topic_users tu
SET seen_post_count = t.posts_count , last_read_post_number = highest_post_number
SET highest_seen_post_number = t.highest_post_number , last_read_post_number = highest_post_number
FROM topics t
WHERE t.id = tu.topic_id AND tu.user_id = :user_id AND t.id IN (:topic_ids)
"