mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 20:01:11 +08:00
5108cf8ddf
Make sure the topic_user.bookmarked column is set correctly when user bookmarks/unbookmarks any post in a topic. For example, you bookmarked a post in the topic that was not the OP, the bookmark icon in the topic list would not be shown. Same if deleting a bookmark for the last bookmarked post in a topic, the bookmark icon in the topic list would not be removed. Previously this was only setting it to true if bookmarking the OP/topic, which was not correct -- we want to show the icon on the topic list if any post is bookmarked. Also set to false if unbookmarking the last bookmarked post in the topic. Also in this PR is a migration to correct any out of sync topic_user.bookmarked columns, based on the new logic. |
||
---|---|---|
.. | ||
fixtures | ||
migrate | ||
post_migrate | ||
api_test_seeds.rb |