Add an appEvent for when a post is created

List for `post:created` and you'll be passed the new post when it is
created.
This commit is contained in:
Robin Ward 2019-10-08 10:12:03 -04:00
parent 057f698e37
commit 50fae909d6
1 changed files with 1 additions and 0 deletions

View File

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