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);
|
||||
customHtml = rainbow(customHtml);
|
||||
msgType = MsgType.Emote;
|
||||
} else if (commandName === Command.Html) {
|
||||
customHtml = plainText;
|
||||
} else if (commandName === Command.Shrug) {
|
||||
plainText = `${SHRUG} ${plainText}`;
|
||||
customHtml = `${SHRUG} ${customHtml}`;
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue