1
0
Fork 0
mirror of synced 2024-10-04 04:06:16 +13:00

moves messaging collection to common, adds subqueryTargets

This commit is contained in:
prateek banga 2023-08-16 18:48:38 +05:30
parent 37e5cecfb1
commit 9fc75e5535
2 changed files with 634 additions and 606 deletions

File diff suppressed because it is too large Load diff

View file

@ -521,6 +521,19 @@ Database::addFilter(
}
);
Database::addFilter(
'subQueryTargets',
function (mixed $value) {
return null;
},
function (mixed $value, Document $document, Database $database) {
return Authorization::skip(fn() => $database
->find('targets', [
Query::equal('userInternalId', [$document->getInternalId()]),
Query::limit(APP_LIMIT_SUBQUERY),
]));
}
);
/**
* DB Formats
*/