mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 04:31:57 +08:00
Include missing discussion relationship
This commit is contained in:
parent
183badef86
commit
d241a09f83
@ -37,14 +37,14 @@ class AddApiRelationships
|
||||
if ($event->action instanceof Discussions\ShowAction) {
|
||||
$event->addInclude('posts.mentionedBy');
|
||||
$event->addInclude('posts.mentionedBy.user');
|
||||
$event->addLink('posts.mentionedBy.discussion');
|
||||
$event->addInclude('posts.mentionedBy.discussion');
|
||||
}
|
||||
|
||||
if ($event->action instanceof Posts\ShowAction ||
|
||||
$event->action instanceof Posts\IndexAction) {
|
||||
$event->addInclude('mentionedBy');
|
||||
$event->addInclude('mentionedBy.user');
|
||||
$event->addLink('mentionedBy.discussion');
|
||||
$event->addInclude('mentionedBy.discussion');
|
||||
}
|
||||
|
||||
if ($event->action instanceof Posts\CreateAction) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user