mirror of
https://github.com/flarum/framework.git
synced 2025-02-22 07:19:56 +08:00
Fix DiscussionWasStarted event not being dispatched
This commit is contained in:
parent
f2cec9fead
commit
fa9f3a7f29
@ -34,6 +34,8 @@ class StartDiscussionCommandHandler
|
|||||||
|
|
||||||
$discussion->save();
|
$discussion->save();
|
||||||
|
|
||||||
|
$this->dispatchEventsFor($discussion);
|
||||||
|
|
||||||
// Now that the discussion has been created, we can add the first post.
|
// 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
|
// For now we will do this by running the PostReply command, but as this
|
||||||
// will trigger a domain event that is slightly semantically incorrect
|
// will trigger a domain event that is slightly semantically incorrect
|
||||||
@ -46,8 +48,6 @@ class StartDiscussionCommandHandler
|
|||||||
// to refresh its data.
|
// to refresh its data.
|
||||||
$discussion = $post->discussion;
|
$discussion = $post->discussion;
|
||||||
|
|
||||||
$this->dispatchEventsFor($discussion);
|
|
||||||
|
|
||||||
return $discussion;
|
return $discussion;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user