feat: Add user metadata changing display name and description with sync
All checks were successful
Queue Release Build / prepare (push) Successful in 28s
Deploy Web Apps / deploy (push) Successful in 5m2s
Queue Release Build / build-windows (push) Successful in 16m44s
Queue Release Build / build-linux (push) Successful in 27m12s
Queue Release Build / finalize (push) Successful in 22s

This commit is contained in:
2026-04-17 22:04:18 +02:00
parent 3ba8a2c9eb
commit bd21568726
41 changed files with 1176 additions and 191 deletions

View File

@@ -30,6 +30,10 @@ export class SignalingTransportHandler<TMessage> {
return this.lastIdentifyCredentials?.displayName || DEFAULT_DISPLAY_NAME;
}
getIdentifyDescription(): string | undefined {
return this.lastIdentifyCredentials?.description;
}
getConnectedSignalingManagers(): ConnectedSignalingManager[] {
return this.dependencies.signalingCoordinator.getConnectedSignalingManagers();
}
@@ -160,12 +164,27 @@ export class SignalingTransportHandler<TMessage> {
return true;
}
identify(oderId: string, displayName: string, signalUrl?: string): void {
identify(
oderId: string,
displayName: string,
signalUrl?: string,
profile?: Pick<IdentifyCredentials, 'description' | 'profileUpdatedAt'>
): void {
const normalizedDisplayName = displayName.trim() || DEFAULT_DISPLAY_NAME;
const normalizedDescription = typeof profile?.description === 'string'
? (profile.description.trim() || undefined)
: undefined;
const normalizedProfileUpdatedAt = typeof profile?.profileUpdatedAt === 'number'
&& Number.isFinite(profile.profileUpdatedAt)
&& profile.profileUpdatedAt > 0
? profile.profileUpdatedAt
: undefined;
this.lastIdentifyCredentials = {
oderId,
displayName: normalizedDisplayName
displayName: normalizedDisplayName,
description: normalizedDescription,
profileUpdatedAt: normalizedProfileUpdatedAt
};
if (signalUrl) {
@@ -173,6 +192,8 @@ export class SignalingTransportHandler<TMessage> {
type: SIGNALING_TYPE_IDENTIFY,
oderId,
displayName: normalizedDisplayName,
description: normalizedDescription,
profileUpdatedAt: normalizedProfileUpdatedAt,
connectionScope: signalUrl
});
@@ -190,6 +211,8 @@ export class SignalingTransportHandler<TMessage> {
type: SIGNALING_TYPE_IDENTIFY,
oderId,
displayName: normalizedDisplayName,
description: normalizedDescription,
profileUpdatedAt: normalizedProfileUpdatedAt,
connectionScope: managerSignalUrl
});
}