Log an event for topic:created

You can distinguish between `post:created` and `topic:created` now.
This commit is contained in:
Robin Ward 2019-10-08 10:39:03 -04:00
parent 50fae909d6
commit d527f3a723

View File

@ -941,7 +941,11 @@ const Composer = RestModel.extend({
composer.clearState(); composer.clearState();
composer.set("createdPost", createdPost); composer.set("createdPost", createdPost);
this.appEvents.trigger("post:created", createdPost); if (composer.replyingToTopic) {
this.appEvents.trigger("post:created", createdPost);
} else {
this.appEvents.trigger("topic:created", createdPost, composer);
}
if (addedToStream) { if (addedToStream) {
composer.set("composeState", CLOSED); composer.set("composeState", CLOSED);