more details with federation
Some checks failed
Build & Push Docker Image / build (push) Has been cancelled

This commit is contained in:
2026-02-27 15:51:46 +01:00
parent e5b6c225e9
commit d7d7991ff0
7 changed files with 131 additions and 10 deletions

View File

@@ -201,6 +201,9 @@ export async function initDatabase() {
room_name TEXT NOT NULL,
from_user TEXT NOT NULL,
join_url TEXT NOT NULL,
meet_id TEXT,
max_participants INTEGER DEFAULT 0,
allow_recording INTEGER DEFAULT 1,
created_at TIMESTAMP DEFAULT NOW()
);
CREATE INDEX IF NOT EXISTS idx_fed_rooms_user_id ON federated_rooms(user_id);
@@ -289,6 +292,9 @@ export async function initDatabase() {
room_name TEXT NOT NULL,
from_user TEXT NOT NULL,
join_url TEXT NOT NULL,
meet_id TEXT,
max_participants INTEGER DEFAULT 0,
allow_recording INTEGER DEFAULT 1,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
);
@@ -319,6 +325,24 @@ export async function initDatabase() {
await db.exec('ALTER TABLE users ADD COLUMN verification_token_expires DATETIME');
}
}
if (!(await db.columnExists('federated_rooms', 'meet_id'))) {
await db.exec('ALTER TABLE federated_rooms ADD COLUMN meet_id TEXT');
}
if (!(await db.columnExists('federated_rooms', 'max_participants'))) {
await db.exec('ALTER TABLE federated_rooms ADD COLUMN max_participants INTEGER DEFAULT 0');
}
if (!(await db.columnExists('federated_rooms', 'allow_recording'))) {
await db.exec('ALTER TABLE federated_rooms ADD COLUMN allow_recording INTEGER DEFAULT 1');
}
if (!(await db.columnExists('federation_invitations', 'room_uid'))) {
await db.exec('ALTER TABLE federation_invitations ADD COLUMN room_uid TEXT');
}
if (!(await db.columnExists('federation_invitations', 'max_participants'))) {
await db.exec('ALTER TABLE federation_invitations ADD COLUMN max_participants INTEGER DEFAULT 0');
}
if (!(await db.columnExists('federation_invitations', 'allow_recording'))) {
await db.exec('ALTER TABLE federation_invitations ADD COLUMN allow_recording INTEGER DEFAULT 1');
}
// ── Default admin ───────────────────────────────────────────────────────
const adminEmail = process.env.ADMIN_EMAIL || 'admin@example.com';