mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-04 22:40:29 +03:00
Add support for /html
This commit is contained in:
parent
504eee3713
commit
fac4a3ce5b
2 changed files with 8 additions and 0 deletions
|
|
@ -326,6 +326,8 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
|
||||||
plainText = rainbow(plainText);
|
plainText = rainbow(plainText);
|
||||||
customHtml = rainbow(customHtml);
|
customHtml = rainbow(customHtml);
|
||||||
msgType = MsgType.Emote;
|
msgType = MsgType.Emote;
|
||||||
|
} else if (commandName === Command.Html) {
|
||||||
|
customHtml = plainText;
|
||||||
} else if (commandName === Command.Shrug) {
|
} else if (commandName === Command.Shrug) {
|
||||||
plainText = `${SHRUG} ${plainText}`;
|
plainText = `${SHRUG} ${plainText}`;
|
||||||
customHtml = `${SHRUG} ${customHtml}`;
|
customHtml = `${SHRUG} ${customHtml}`;
|
||||||
|
|
|
||||||
|
|
@ -142,6 +142,7 @@ export enum Command {
|
||||||
Notice = 'notice',
|
Notice = 'notice',
|
||||||
Rainbow = 'rainbow',
|
Rainbow = 'rainbow',
|
||||||
RainbowMe = 'rainbowme',
|
RainbowMe = 'rainbowme',
|
||||||
|
Html = 'html',
|
||||||
Shrug = 'shrug',
|
Shrug = 'shrug',
|
||||||
StartDm = 'startdm',
|
StartDm = 'startdm',
|
||||||
Join = 'join',
|
Join = 'join',
|
||||||
|
|
@ -196,6 +197,11 @@ export const useCommands = (mx: MatrixClient, room: Room): CommandRecord => {
|
||||||
description: 'Send rainbow action message',
|
description: 'Send rainbow action message',
|
||||||
exe: async () => undefined,
|
exe: async () => undefined,
|
||||||
},
|
},
|
||||||
|
[Command.Html]: {
|
||||||
|
name: Command.Html,
|
||||||
|
description: 'Send raw HTML message',
|
||||||
|
exe: async () => undefined,
|
||||||
|
},
|
||||||
[Command.Shrug]: {
|
[Command.Shrug]: {
|
||||||
name: Command.Shrug,
|
name: Command.Shrug,
|
||||||
description: 'Send ¯\\_(ツ)_/¯ as message',
|
description: 'Send ¯\\_(ツ)_/¯ as message',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue