mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
fix realtime
This commit is contained in:
+2
-3
@@ -533,12 +533,11 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re
|
||||
$database->setDefaultDatabase(App::getEnv('_APP_DB_SCHEMA', 'appwrite'));
|
||||
|
||||
$projectId = $realtime->connections[$connection]['projectId'];
|
||||
|
||||
$database->setNamespace("_console");
|
||||
$project = Authorization::skip(fn() => $database->getDocument('projects', $realtime->connections[$connection]['projectId']));
|
||||
$project = Authorization::skip(fn() => $database->getDocument('projects', $projectId));
|
||||
|
||||
if ($projectId != 'console') {
|
||||
$filters = getFilters($database, $projectId);
|
||||
$filters = getFilters($project);
|
||||
$database = new Database(new MariaDB($db), $cache, $filters);
|
||||
$database->setDefaultDatabase(App::getEnv('_APP_DB_SCHEMA', 'appwrite'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user