You've already forked element-web
mirror of
https://github.com/element-hq/element-web.git
synced 2025-12-01 09:58:03 +03:00
Extensibility, TypeScript and lazy loading
This commit is contained in:
@@ -77,6 +77,7 @@ export const CommandCategories = {
|
||||
"actions": _td("Actions"),
|
||||
"admin": _td("Admin"),
|
||||
"advanced": _td("Advanced"),
|
||||
"effects": _td("Effects"),
|
||||
"other": _td("Other"),
|
||||
};
|
||||
|
||||
@@ -1045,19 +1046,16 @@ export const Commands = [
|
||||
args: '<message>',
|
||||
runFn: function(roomId, args) {
|
||||
return success((async () => {
|
||||
const isChatEffectsDisabled = SettingsStore.getValue('dontShowChatEffects');
|
||||
if ((!args) || (!args && isChatEffectsDisabled)) {
|
||||
if (!args) {
|
||||
args = _t("sends confetti");
|
||||
MatrixClientPeg.get().sendEmoteMessage(roomId, args);
|
||||
} else {
|
||||
MatrixClientPeg.get().sendTextMessage(roomId, args);
|
||||
}
|
||||
if (!isChatEffectsDisabled) {
|
||||
dis.dispatch({action: 'confetti'});
|
||||
}
|
||||
dis.dispatch({action: 'effects.confetti'});
|
||||
})());
|
||||
},
|
||||
category: CommandCategories.actions,
|
||||
category: CommandCategories.effects,
|
||||
}),
|
||||
|
||||
// Command definitions for autocompletion ONLY:
|
||||
|
||||
Reference in New Issue
Block a user