Merge branch '1.8.x' of github.com:appwrite/appwrite into 1.8.x

This commit is contained in:
Jake Barnby 2025-07-22 16:35:43 +12:00
commit 63a24c82f8
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C
2 changed files with 7 additions and 4 deletions

View file

@ -271,7 +271,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
->setTwitter(APP_SOCIAL_TWITTER_HANDLE)
->setDiscord(APP_SOCIAL_DISCORD_CHANNEL, APP_SOCIAL_DISCORD)
->setDefaultHeaders([
'X-Appwrite-Response-Format' => '1.7.0',
'X-Appwrite-Response-Format' => '1.8.0',
])
->setExclude($language['exclude'] ?? []);

View file

@ -16,7 +16,7 @@ class V20 extends Filter
switch ($model) {
case 'databases.getDocument':
case 'databases.listDocuments':
$content = $this->manageSelectQueries($content, $model);
$content = $this->manageSelectQueries($content);
break;
}
return $content;
@ -30,7 +30,7 @@ class V20 extends Filter
* This filter preserves 1.7.x behavior by including all related documents for backward compatibility with
* `listDocuments` and `getDocument` calls.
*/
protected function manageSelectQueries(array $content, string $model): array
protected function manageSelectQueries(array $content): array
{
$hasWildcard = false;
if (! isset($content['queries'])) {
@ -58,7 +58,10 @@ class V20 extends Filter
}
}
if ($hasWildcard && $model === 'databases.listDocuments') {
/**
* Add `keys.*` for all model types!
*/
if ($hasWildcard) {
$relatedKeys = $this->getRelatedCollectionKeys();
if (! empty($relatedKeys)) {