feat: signal server tag

This commit is contained in:
2026-06-05 06:16:02 +02:00
parent 6865147e8f
commit bf4e6891d1
69 changed files with 2808 additions and 1269 deletions

View File

@@ -24,7 +24,8 @@ export async function handleSaveUser(command: SaveUserCommand, dataSource: DataS
isAdmin: user.isAdmin ? 1 : 0,
isRoomOwner: user.isRoomOwner ? 1 : 0,
voiceState: user.voiceState != null ? JSON.stringify(user.voiceState) : null,
screenShareState: user.screenShareState != null ? JSON.stringify(user.screenShareState) : null
screenShareState: user.screenShareState != null ? JSON.stringify(user.screenShareState) : null,
homeSignalServerUrl: user.homeSignalServerUrl ?? null
});
await repo.save(entity);

View File

@@ -61,7 +61,8 @@ export function rowToUser(row: UserEntity) {
isAdmin: !!row.isAdmin,
isRoomOwner: !!row.isRoomOwner,
voiceState: row.voiceState ? JSON.parse(row.voiceState) : undefined,
screenShareState: row.screenShareState ? JSON.parse(row.screenShareState) : undefined
screenShareState: row.screenShareState ? JSON.parse(row.screenShareState) : undefined,
homeSignalServerUrl: row.homeSignalServerUrl ?? undefined
};
}

View File

@@ -130,6 +130,7 @@ export interface UserPayload {
isRoomOwner?: boolean;
voiceState?: unknown;
screenShareState?: unknown;
homeSignalServerUrl?: string;
}
export interface RoomPayload {

View File

@@ -62,4 +62,7 @@ export class UserEntity {
@Column('text', { nullable: true })
screenShareState!: string | null;
@Column('text', { nullable: true })
homeSignalServerUrl!: string | null;
}

View File

@@ -0,0 +1,13 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
export class AddHomeSignalServerUrl1000000000012 implements MigrationInterface {
name = 'AddHomeSignalServerUrl1000000000012';
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "users" ADD COLUMN "homeSignalServerUrl" TEXT`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
// SQLite column removal requires table rebuilds. Keep rollback no-op.
}
}