Skip to content

A platform for community discussion. Free, open, simple.

FIX: Trigger an event when a post is bookmarked. (#11407)

Roman Rizzi4aeb3ef8e0b0
diff --git a/app/assets/javascripts/discourse/app/models/post.js b/app/assets/javascripts/discourse/app/models/post.js
index 41dd4c54274..7ccb15340d6 100644
--- a/app/assets/javascripts/discourse/app/models/post.js
+++ b/app/assets/javascripts/discourse/app/models/post.js
@@ -343,6 +343,7 @@ const Post = RestModel.extend({
bookmark_id: savedData.id,
});
resolve({ closedWithoutSaving: false });
+ this.appEvents.trigger("page:bookmark-post-toggled", this);
this.appEvents.trigger("post-stream:refresh", { id: this.id });
},
afterDelete: (topicBookmarked) => {