fix(session-sharing): use the linked server for desktop meetings and links (#1507)

This commit is contained in:
ZacharyZcR authored and GitHub committed 2026-09-30 09:54:23 -05:00
1 parent 9801cc7fc7
commit ec7c2c2835
15 files changed
+621 -210

No files matched your search

@@ -1,4 +1,5 @@
import http from "node:http";
import { sqliteTable, integer, text } from "drizzle-orm/sqlite-core";
import type { AddressInfo } from "node:net";
import { fileURLToPath } from "node:url";
import express, { type Router } from "express";
@@ -85,7 +86,20 @@ export async function startServer(
settings?: Record<string, unknown>;
} = {},
): Promise<TestServer> {
const db = await createTestDb(pluginDir);
const db = await createTestDb(pluginDir, {
before: (sqlite) => {
sqlite.exec("ALTER TABLE ssh_data ADD COLUMN sync_id TEXT");
},
});
const refs = await db.database.refs();
db.database.refs = async () =>
({
...refs,
hosts: sqliteTable("ssh_data", {
id: integer("id").primaryKey(),
syncId: text("sync_id"),
}),
}) as Awaited<ReturnType<typeof db.database.refs>>;
for (const user of options.users ?? ["alice", "bob", "carol"]) {
db.sqlite
.prepare("INSERT INTO users (id, username, is_admin) VALUES (?, ?, ?)")