From 288b59f1684aacd88addd4f2d6a7a5a936bd8a35 Mon Sep 17 00:00:00 2001 From: simoleo89 Date: Sun, 7 Jun 2026 12:04:53 +0200 Subject: [PATCH] fix(chat-input): restore RoomWidgetUpdateChatInputContentEvent.TEXT mode Upstream 7007752 removed the TEXT constant + its handler case while migrating in-component inserts to setChatValue, but NotificationDefaultAlertView still dispatches TEXT to copy a command into the chat input (the only cross-component path to set the input). Restore the constant and the handler case (setChatValue + focus, matching the command-selector path). Fixes TS2339. --- src/api/room/events/RoomWidgetUpdateChatInputContentEvent.ts | 1 + src/components/room/widgets/chat-input/ChatInputView.tsx | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/api/room/events/RoomWidgetUpdateChatInputContentEvent.ts b/src/api/room/events/RoomWidgetUpdateChatInputContentEvent.ts index 9352372..aea7193 100644 --- a/src/api/room/events/RoomWidgetUpdateChatInputContentEvent.ts +++ b/src/api/room/events/RoomWidgetUpdateChatInputContentEvent.ts @@ -5,6 +5,7 @@ export class RoomWidgetUpdateChatInputContentEvent extends RoomWidgetUpdateEvent public static CHAT_INPUT_CONTENT: string = 'RWUCICE_CHAT_INPUT_CONTENT'; public static WHISPER: string = 'whisper'; public static SHOUT: string = 'shout'; + public static TEXT: string = 'text'; private _chatMode: string = ''; private _userName: string = ''; diff --git a/src/components/room/widgets/chat-input/ChatInputView.tsx b/src/components/room/widgets/chat-input/ChatInputView.tsx index 34178e4..0997b3e 100644 --- a/src/components/room/widgets/chat-input/ChatInputView.tsx +++ b/src/components/room/widgets/chat-input/ChatInputView.tsx @@ -236,6 +236,10 @@ export const ChatInputView: FC<{}> = props => { switch(event.chatMode) { + case RoomWidgetUpdateChatInputContentEvent.TEXT: + setChatValue(event.userName); + inputRef.current?.focus(); + return; case RoomWidgetUpdateChatInputContentEvent.WHISPER: { setChatValue(`${ chatModeIdWhisper } ${ event.userName } `); return;