From 643c81b7a58ea4d15365fc699040188e6fc3ab2c Mon Sep 17 00:00:00 2001 From: Murtaza Sultani Date: Thu, 2 Oct 2025 13:31:27 +0200 Subject: Apply 1 suggestion(s) to 1 file(s) Co-authored-by: Jan-Hendrik Willms --- lib/classes/JsonApi/Schemas/Forum/Posting.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/classes/JsonApi/Schemas/Forum/Posting.php b/lib/classes/JsonApi/Schemas/Forum/Posting.php index c0a47a4..1622e2b 100644 --- a/lib/classes/JsonApi/Schemas/Forum/Posting.php +++ b/lib/classes/JsonApi/Schemas/Forum/Posting.php @@ -142,13 +142,14 @@ class Posting extends SchemaProvider private function addEditorRelationship(array $relationships, \Forum\Posting $posting, bool $withEditor = false) { + $relationships[self::REL_EDITOR] = [ + self::RELATIONSHIP_LINKS => [ + Link::RELATED => $this->getRelationshipRelatedLink($posting, self::REL_REACTIONS) + ], + ]; + if ($withEditor) { - $relationships[self::REL_EDITOR] = [ - self::RELATIONSHIP_LINKS => [ - Link::RELATED => $this->getRelationshipRelatedLink($posting, self::REL_REACTIONS) - ], - self::RELATIONSHIP_DATA => $posting->editor - ]; + $relationships[self::REL_EDITOR][self::RELATIONSHIP_DATA] = $posting->editor; } return $relationships; -- cgit v1.0