Add event for when a post is flagged

This allows plugins to track events such as analytics.
This commit is contained in:
Robin Ward 2019-10-24 16:47:54 -04:00
parent 5d1b34e1b9
commit 7b04bb7290

View File

@ -155,6 +155,13 @@ export default Controller.extend(ModalFunctionality, {
params = $.extend(params, opts); params = $.extend(params, opts);
} }
this.appEvents.trigger(
this.flagTopic ? "topic:flag-created" : "post:flag-created",
this.model,
postAction,
params
);
this.send("hideModal"); this.send("hideModal");
postAction postAction