diff --git a/framework/core/src/Core/Handlers/Commands/StartDiscussionCommandHandler.php b/framework/core/src/Core/Handlers/Commands/StartDiscussionCommandHandler.php index 6ca89b786..810df4cc7 100644 --- a/framework/core/src/Core/Handlers/Commands/StartDiscussionCommandHandler.php +++ b/framework/core/src/Core/Handlers/Commands/StartDiscussionCommandHandler.php @@ -34,6 +34,8 @@ class StartDiscussionCommandHandler $discussion->save(); + $this->dispatchEventsFor($discussion); + // Now that the discussion has been created, we can add the first post. // For now we will do this by running the PostReply command, but as this // will trigger a domain event that is slightly semantically incorrect @@ -46,8 +48,6 @@ class StartDiscussionCommandHandler // to refresh its data. $discussion = $post->discussion; - $this->dispatchEventsFor($discussion); - return $discussion; } }