Defer world activation until welcome preflight confirmation

This commit is contained in:
Jage9
2026-02-28 20:58:23 -05:00
parent e669bf8a57
commit 429b295a64
8 changed files with 71 additions and 7 deletions

View File

@@ -2091,6 +2091,7 @@ async function onSignalingMessage(message: IncomingMessage): Promise<void> {
}
await onAppMessage(message);
if (message.type === 'welcome') {
signaling.send({ type: 'welcome_ready' });
await setupMediaAfterAuth();
if (playSelfLoginSound) {
void audio.playSample(SYSTEM_SOUND_URLS.logon, 1);

View File

@@ -367,6 +367,7 @@ export type OutgoingMessage =
| { type: 'auth_login'; username: string; password: string }
| { type: 'auth_resume'; sessionToken: string }
| { type: 'auth_logout' }
| { type: 'welcome_ready' }
| { type: 'admin_roles_list' }
| { type: 'admin_role_create'; name: string }
| { type: 'admin_role_update_permissions'; role: string; permissions: string[] }