fix: WebSocket heartbeat to prevent idle drops + debounce reconnect sound

30s ping/pong keepalive prevents proxy/NAT from killing idle connections.
Reconnect sound now only plays if downtime exceeds 3s, suppressing phantom
audio from brief network blips.
This commit is contained in:
Jannis Braun
2026-02-23 19:45:32 +01:00
parent edcdf8b207
commit 77c5bda1fd
4 changed files with 38 additions and 3 deletions
+3 -1
View File
@@ -186,7 +186,8 @@ export type ClientEvent =
| { type: 'dm_call_accept'; dmChannelId: string }
| { type: 'dm_call_reject'; dmChannelId: string }
| { type: 'dm_call_end'; dmChannelId: string }
| { type: 'voice_status'; isMuted: boolean; isDeafened: boolean };
| { type: 'voice_status'; isMuted: boolean; isDeafened: boolean }
| { type: 'ping' };
// Server → Client Events
export type ServerEvent =
@@ -220,6 +221,7 @@ export type ServerEvent =
| { type: 'channel_updated'; channel: Channel; serverId: string }
| { type: 'channel_deleted'; channelId: string; serverId: string }
| { type: 'server_updated'; server: Server }
| { type: 'pong' }
| { type: 'error'; message: string };
// ─── API Request/Response Types ─────────────────────────────────────────────