mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 20:12:45 +08:00
Add event for when a post is flagged
This allows plugins to track events such as analytics.
This commit is contained in:
parent
5d1b34e1b9
commit
7b04bb7290
|
@ -155,6 +155,13 @@ export default Controller.extend(ModalFunctionality, {
|
|||
params = $.extend(params, opts);
|
||||
}
|
||||
|
||||
this.appEvents.trigger(
|
||||
this.flagTopic ? "topic:flag-created" : "post:flag-created",
|
||||
this.model,
|
||||
postAction,
|
||||
params
|
||||
);
|
||||
|
||||
this.send("hideModal");
|
||||
|
||||
postAction
|
||||
|
|
Loading…
Reference in New Issue
Block a user