remove unused import
fix if condition trying (pass the dispatcher to sendHtmlMessage)pull/21833/head
parent
d41ffb1b4b
commit
43f266bfe3
|
@ -44,7 +44,6 @@ import { ensureDMExists } from "./createRoom";
|
||||||
import { ViewUserPayload } from "./dispatcher/payloads/ViewUserPayload";
|
import { ViewUserPayload } from "./dispatcher/payloads/ViewUserPayload";
|
||||||
import { Action } from "./dispatcher/actions";
|
import { Action } from "./dispatcher/actions";
|
||||||
import { EffectiveMembership, getEffectiveMembership } from "./utils/membership";
|
import { EffectiveMembership, getEffectiveMembership } from "./utils/membership";
|
||||||
import {func} from "prop-types";
|
|
||||||
import SettingsStore from "./settings/SettingsStore";
|
import SettingsStore from "./settings/SettingsStore";
|
||||||
|
|
||||||
// XXX: workaround for https://github.com/microsoft/TypeScript/issues/31816
|
// XXX: workaround for https://github.com/microsoft/TypeScript/issues/31816
|
||||||
|
@ -1038,13 +1037,11 @@ export const Commands = [
|
||||||
const userId = cli.getUserId();
|
const userId = cli.getUserId();
|
||||||
const userName = userId.slice(1).split(":").slice(0, 1);
|
const userName = userId.slice(1).split(":").slice(0, 1);
|
||||||
const isChatEffectsDisabled = SettingsStore.getValue('dontShowChatEffects');
|
const isChatEffectsDisabled = SettingsStore.getValue('dontShowChatEffects');
|
||||||
if (!args || isChatEffectsDisabled) {
|
if ((!args) || (!args && isChatEffectsDisabled)) {
|
||||||
args = _t("* %(userName)s sends confetti", {userName});
|
args = _t("* %(userName)s sends confetti", {userName});
|
||||||
}
|
}
|
||||||
if (!isChatEffectsDisabled) {
|
cli.sendHtmlMessage(roomId, args,
|
||||||
dis.dispatch({action: 'confetti'});
|
dis.dispatch({action: 'confetti'}));
|
||||||
}
|
|
||||||
cli.sendHtmlMessage(roomId, args);
|
|
||||||
})());
|
})());
|
||||||
},
|
},
|
||||||
category: CommandCategories.actions,
|
category: CommandCategories.actions,
|
||||||
|
|
Loading…
Reference in New Issue