mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 13:31:18 +08:00
FIX: Rename all instances of bookmarkWithReminder to just bookmark (#9579)
* Rename all instances of bookmarkWithReminder and bookmark_with_reminder to just bookmark * Delete old bookmark code at the same time * Add migration to remove the bookmarkWithReminder post menu item if people have it set in site settings
This commit is contained in:
@ -14,19 +14,19 @@ function initialize(api) {
|
||||
});
|
||||
|
||||
api.modifyClass("model:post", {
|
||||
toggleBookmarkWithReminder() {
|
||||
toggleBookmark() {
|
||||
// if we are talking to discobot then any bookmarks should just
|
||||
// be created without reminder options, to streamline the new user
|
||||
// narrative.
|
||||
const discobotUserId = -2;
|
||||
if (this.user_id === discobotUserId && !this.bookmarked_with_reminder) {
|
||||
if (this.user_id === discobotUserId && !this.bookmarked) {
|
||||
return ajax("/bookmarks", {
|
||||
type: "POST",
|
||||
data: { post_id: this.id }
|
||||
}).then(response => {
|
||||
this.setProperties({
|
||||
"topic.bookmarked": true,
|
||||
bookmarked_with_reminder: true,
|
||||
bookmarked: true,
|
||||
bookmark_id: response.id
|
||||
});
|
||||
this.appEvents.trigger("post-stream:refresh", { id: this.id });
|
||||
|
Reference in New Issue
Block a user