Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/SlashCommands.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export const Commands = [
command: "upgraderoom",
args: "<new_version>",
description: _td("slash_command|upgraderoom"),
isEnabled: (cli) => !isCurrentLocalRoom(cli) && SettingsStore.getValue("developerMode"),
isEnabled: (cli) => !isCurrentLocalRoom(cli),
runFn: function (cli, roomId, threadId, args) {
if (args) {
const room = cli.getRoom(roomId);
Expand Down
9 changes: 1 addition & 8 deletions test/unit-tests/SlashCommands-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@ import { act, waitFor } from "jest-matrix-react";
import { type Command, Commands, getCommand } from "../../src/SlashCommands";
import { createTestClient } from "../test-utils";
import { LocalRoom, LOCAL_ROOM_ID_PREFIX } from "../../src/models/LocalRoom";
import SettingsStore from "../../src/settings/SettingsStore";
import { SdkContextClass } from "../../src/contexts/SDKContext";
import Modal, { type ComponentType, type IHandle } from "../../src/Modal";
import WidgetUtils from "../../src/utils/WidgetUtils";
import { WidgetType } from "../../src/widgets/WidgetType";
import { warnSelfDemote } from "../../src/components/views/right_panel/UserInfo";
import dispatcher from "../../src/dispatcher/dispatcher";
import { SettingLevel } from "../../src/settings/SettingLevel";
import QuestionDialog from "../../src/components/views/dialogs/QuestionDialog";
import ErrorDialog from "../../src/components/views/dialogs/ErrorDialog";

Expand Down Expand Up @@ -127,12 +125,7 @@ describe("SlashCommands", () => {
setCurrentRoom();
});

it("should be disabled by default", () => {
expect(command.isEnabled(client)).toBe(false);
});

it("should be enabled for developerMode", () => {
SettingsStore.setValue("developerMode", null, SettingLevel.DEVICE, true);
it("should be enabled by default", () => {
expect(command.isEnabled(client)).toBe(true);
});
});
Expand Down
Loading