mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 19:53:41 +08:00
FEATURE: Polymorphic bookmarks pt. 1 (CRUD) (#16308)
This commit introduces a new use_polymorphic_bookmarks site setting that is default false and hidden, that will be used to help continuous development of polymorphic bookmarks. This setting **should not** be enabled anywhere in production yet, it is purely for local development. This commit uses the setting to enable create/update/delete actions for polymorphic bookmarks on the server and client side. The bookmark interactions on topics/posts are all usable. Listing, searching, sending bookmark reminders, and other edge cases will be handled in subsequent PRs. Comprehensive UI tests will be added in the final PR -- we already have them for regular bookmarks, so it will just be a matter of changing them to be for polymorphic bookmarks.
This commit is contained in:
@ -7,6 +7,9 @@ class BookmarkReminderNotificationHandler
|
||||
# we don't send reminders for deleted posts or topics,
|
||||
# just as we don't allow creation of bookmarks for deleted
|
||||
# posts or topics
|
||||
#
|
||||
# TODO (martin) [POLYBOOK] This will need to be restructured for polymorphic
|
||||
# bookmarks when reminders are handled.
|
||||
if bookmark.post.blank? || bookmark.topic.blank?
|
||||
clear_reminder(bookmark)
|
||||
else
|
||||
|
Reference in New Issue
Block a user