From 674c4d0b69ceee2aab5d399136f063d1bb60b9a3 Mon Sep 17 00:00:00 2001 From: "Torsten Schulz (local)" Date: Fri, 27 Mar 2026 14:29:00 +0100 Subject: [PATCH] refactor(chat): simplify adult-only mode checks in MultiChatDialog.vue - Removed redundant checks for adult-only mode when opening the chat dialog and connecting the chat socket. - Streamlined the logic to enhance readability and maintainability of the component. --- frontend/src/dialogues/chat/MultiChatDialog.vue | 9 --------- 1 file changed, 9 deletions(-) diff --git a/frontend/src/dialogues/chat/MultiChatDialog.vue b/frontend/src/dialogues/chat/MultiChatDialog.vue index f5d6738..7bd36fa 100644 --- a/frontend/src/dialogues/chat/MultiChatDialog.vue +++ b/frontend/src/dialogues/chat/MultiChatDialog.vue @@ -768,10 +768,6 @@ export default { this.announcedRoomEnter = false; this.$refs.dialog.open(); this.opened = true; - if (this.adultOnlyMode && !this.resolveInitialRoomName()) { - this.setStatus('idle'); - return; - } // Stelle die WS-Verbindung her, wenn der Dialog geƶffnet wird this.connectChatSocket(); // Add network event listeners @@ -779,11 +775,6 @@ export default { window.addEventListener('offline', this.onOffline); }, connectChatSocket() { - if (this.adultOnlyMode && !this.resolveInitialRoomName()) { - console.warn('[Chat WS] adult mode without selected room - aborting connect'); - this.setStatus('idle'); - return; - } if (this.connectRacing) return; // avoid overlapping races try { this.chatWs?.close(1000, 'reconnect'); } catch (_) { } this.chatWs = null;