diff --git a/src/app/features/room/RoomInput.tsx b/src/app/features/room/RoomInput.tsx index 5a5a5b80..de389643 100644 --- a/src/app/features/room/RoomInput.tsx +++ b/src/app/features/room/RoomInput.tsx @@ -326,6 +326,8 @@ export const RoomInput = forwardRef( plainText = rainbow(plainText); customHtml = rainbow(customHtml); msgType = MsgType.Emote; + } else if (commandName === Command.Html) { + customHtml = plainText; } else if (commandName === Command.Shrug) { plainText = `${SHRUG} ${plainText}`; customHtml = `${SHRUG} ${customHtml}`; diff --git a/src/app/hooks/useCommands.ts b/src/app/hooks/useCommands.ts index 3fc6b6cb..ce59cbd2 100644 --- a/src/app/hooks/useCommands.ts +++ b/src/app/hooks/useCommands.ts @@ -142,6 +142,7 @@ export enum Command { Notice = 'notice', Rainbow = 'rainbow', RainbowMe = 'rainbowme', + Html = 'html', Shrug = 'shrug', StartDm = 'startdm', Join = 'join', @@ -196,6 +197,11 @@ export const useCommands = (mx: MatrixClient, room: Room): CommandRecord => { description: 'Send rainbow action message', exe: async () => undefined, }, + [Command.Html]: { + name: Command.Html, + description: 'Send raw HTML message', + exe: async () => undefined, + }, [Command.Shrug]: { name: Command.Shrug, description: 'Send ¯\\_(ツ)_/¯ as message',