diff --git a/extensions/mentions/src/Listeners/AddApiRelationships.php b/extensions/mentions/src/Listeners/AddApiRelationships.php index b3ac0a20d..ef660955b 100755 --- a/extensions/mentions/src/Listeners/AddApiRelationships.php +++ b/extensions/mentions/src/Listeners/AddApiRelationships.php @@ -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) {