Skip to content

Commit

Permalink
fix(CI): Fix psalm by changing the addHeader() calls
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen committed Jul 24, 2023
1 parent 6034c03 commit 9408c01
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/Controller/ChatController.php
Original file line number Diff line number Diff line change
Expand Up @@ -430,8 +430,8 @@ protected function prepareCommentsAsDataResponse(array $comments, int $lastCommo
// Set the status code to 200 so the header is sent to the client.
// As per "section 10.3.5 of RFC 2616" entity headers shall be
// stripped out on 304: https://stackoverflow.com/a/17822709
$response->setStatus(Http::STATUS_OK);
$response->addHeader('X-Chat-Last-Common-Read', (string) $newLastCommonRead);
$response->setStatus(Http::STATUS_OK);
}
}
return $response;
Expand Down
7 changes: 4 additions & 3 deletions lib/Controller/RoomController.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,10 @@ public function getRooms(int $noStatusUpdate = 0, bool $includeStatus = false, i
}
}

$response = new DataResponse($return, Http::STATUS_OK, $this->getTalkHashHeader());
$response->addHeader('X-Nextcloud-Talk-Modified-Before', (string) $nextModifiedSince);
return $response;
$headers = $this->getTalkHashHeader();
$headers['X-Nextcloud-Talk-Modified-Before'] = (string) $nextModifiedSince;

return new DataResponse($return, Http::STATUS_OK, $headers);
}

/**
Expand Down

0 comments on commit 9408c01

Please sign in to comment.