Add event for when "Reply" is clicked

This is useful by analytics libraries or other code that wants to track
when replies are begun. A new event: `page:compose-reply` is fired with
the topic.
This commit is contained in:
Robin Ward 2019-10-07 14:29:43 -04:00
parent 847f48a9d0
commit 5c9acfec1d
1 changed files with 2 additions and 0 deletions

View File

@ -471,6 +471,8 @@ export default Ember.Controller.extend(bufferedProperty("model"), {
const quoteState = this.quoteState;
const postStream = this.get("model.postStream");
this.appEvents.trigger("page:compose-reply", topic);
if (!postStream || !topic || !topic.get("details.can_create_post")) {
return;
}