mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 07:07:43 +08:00
FEATURE: Promote bookmarks with reminders to core functionality (#9369)
The main thrust of this PR is to take all the conditional checks based on the `enable_bookmarks_with_reminders` away and only keep the code from the `true` path, making bookmarks with reminders the core bookmarks feature. There is also a migration to create `Bookmark` records out of `PostAction` bookmarks for a site. ### Summary * Remove logic based on whether enable_bookmarks_with_reminders is true. This site setting is now obsolete, the old bookmark functionality is being removed. Retain the setting and set the value to `true` in a migration. * Use the code from the rake task to create a database migration that creates bookmarks from post actions. * Change the bookmark report to read from the new table. * Get rid of old endpoints for bookmarks * Link to the new bookmarks list from the user summary page
This commit is contained in:
@ -8,7 +8,6 @@ RSpec.describe BookmarkReminderNotificationHandler do
|
||||
fab!(:user) { Fabricate(:user) }
|
||||
|
||||
before do
|
||||
SiteSetting.enable_bookmarks_with_reminders = true
|
||||
Discourse.redis.flushall
|
||||
end
|
||||
|
||||
@ -89,17 +88,6 @@ RSpec.describe BookmarkReminderNotificationHandler do
|
||||
end
|
||||
end
|
||||
|
||||
context "when enable bookmarks with reminders is disabled" do
|
||||
before do
|
||||
SiteSetting.enable_bookmarks_with_reminders = false
|
||||
end
|
||||
|
||||
it "does nothing" do
|
||||
BrowserDetection.expects(:device).never
|
||||
send_reminder
|
||||
end
|
||||
end
|
||||
|
||||
def send_reminder
|
||||
subject.send_at_desktop_reminder(user: user, request_user_agent: user_agent)
|
||||
end
|
||||
|
Reference in New Issue
Block a user