feat: signal server tag
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -130,6 +130,7 @@ export interface UserPayload {
|
||||
isRoomOwner?: boolean;
|
||||
voiceState?: unknown;
|
||||
screenShareState?: unknown;
|
||||
homeSignalServerUrl?: string;
|
||||
}
|
||||
|
||||
export interface RoomPayload {
|
||||
|
||||
@@ -62,4 +62,7 @@ export class UserEntity {
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
screenShareState!: string | null;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
homeSignalServerUrl!: string | null;
|
||||
}
|
||||
|
||||
13
electron/migrations/1000000000012-AddHomeSignalServerUrl.ts
Normal file
13
electron/migrations/1000000000012-AddHomeSignalServerUrl.ts
Normal 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.
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user