mirror of
https://github.com/flarum/core.git
synced 2025-08-06 08:27:42 +02:00
Include missing discussion relationship
This commit is contained in:
@@ -37,14 +37,14 @@ class AddApiRelationships
|
|||||||
if ($event->action instanceof Discussions\ShowAction) {
|
if ($event->action instanceof Discussions\ShowAction) {
|
||||||
$event->addInclude('posts.mentionedBy');
|
$event->addInclude('posts.mentionedBy');
|
||||||
$event->addInclude('posts.mentionedBy.user');
|
$event->addInclude('posts.mentionedBy.user');
|
||||||
$event->addLink('posts.mentionedBy.discussion');
|
$event->addInclude('posts.mentionedBy.discussion');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($event->action instanceof Posts\ShowAction ||
|
if ($event->action instanceof Posts\ShowAction ||
|
||||||
$event->action instanceof Posts\IndexAction) {
|
$event->action instanceof Posts\IndexAction) {
|
||||||
$event->addInclude('mentionedBy');
|
$event->addInclude('mentionedBy');
|
||||||
$event->addInclude('mentionedBy.user');
|
$event->addInclude('mentionedBy.user');
|
||||||
$event->addLink('mentionedBy.discussion');
|
$event->addInclude('mentionedBy.discussion');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($event->action instanceof Posts\CreateAction) {
|
if ($event->action instanceof Posts\CreateAction) {
|
||||||
|
Reference in New Issue
Block a user