mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 12:02:59 +08:00
Log an event for topic:created
You can distinguish between `post:created` and `topic:created` now.
This commit is contained in:
parent
50fae909d6
commit
d527f3a723
|
@ -941,7 +941,11 @@ const Composer = RestModel.extend({
|
|||
|
||||
composer.clearState();
|
||||
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) {
|
||||
composer.set("composeState", CLOSED);
|
||||
|
|
Loading…
Reference in New Issue
Block a user