1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-04 11:51:45 +03:00

test commit for confetti changes

This commit is contained in:
nurjinn jafar
2020-08-18 17:57:51 +02:00
parent 4394a20f87
commit ecd4d6e19e
5 changed files with 230 additions and 3 deletions

View File

@@ -44,6 +44,7 @@ import { ensureDMExists } from "./createRoom";
import { ViewUserPayload } from "./dispatcher/payloads/ViewUserPayload";
import { Action } from "./dispatcher/actions";
import { EffectiveMembership, getEffectiveMembership } from "./utils/membership";
import {func} from "prop-types";
// XXX: workaround for https://github.com/microsoft/TypeScript/issues/31816
interface HTMLInputEvent extends Event {
@@ -1026,6 +1027,18 @@ export const Commands = [
},
category: CommandCategories.actions,
}),
new Command({
command: "confetti",
description: _td("Throws confetti animation in the chat room"),
args: '/confetti + <message>',
runFn: function(roomId, args, command) {
return success((async () => {
const cli = MatrixClientPeg.get();
await cli.sendHtmlMessage(roomId, args);
})());
},
category: CommandCategories.messages,
}),
// Command definitions for autocompletion ONLY:
// /me is special because its not handled by SlashCommands.js and is instead done inside the Composer classes