You've already forked matrix-react-sdk
							
							
				mirror of
				https://github.com/matrix-org/matrix-react-sdk.git
				synced 2025-11-04 11:51:45 +03:00 
			
		
		
		
	remove unused import
fix if condition trying (pass the dispatcher to sendHtmlMessage)
This commit is contained in:
		@@ -44,7 +44,6 @@ 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";
 | 
			
		||||
import SettingsStore from "./settings/SettingsStore";
 | 
			
		||||
 | 
			
		||||
// XXX: workaround for https://github.com/microsoft/TypeScript/issues/31816
 | 
			
		||||
@@ -1038,13 +1037,11 @@ export const Commands = [
 | 
			
		||||
                const userId = cli.getUserId();
 | 
			
		||||
                const userName = userId.slice(1).split(":").slice(0, 1);
 | 
			
		||||
                const isChatEffectsDisabled = SettingsStore.getValue('dontShowChatEffects');
 | 
			
		||||
                if (!args || isChatEffectsDisabled) {
 | 
			
		||||
                if ((!args) || (!args && isChatEffectsDisabled)) {
 | 
			
		||||
                    args = _t("* %(userName)s sends confetti", {userName});
 | 
			
		||||
                }
 | 
			
		||||
                if (!isChatEffectsDisabled) {
 | 
			
		||||
                    dis.dispatch({action: 'confetti'});
 | 
			
		||||
                }
 | 
			
		||||
                cli.sendHtmlMessage(roomId, args);
 | 
			
		||||
                cli.sendHtmlMessage(roomId, args,
 | 
			
		||||
                    dis.dispatch({action: 'confetti'}));
 | 
			
		||||
            })());
 | 
			
		||||
        },
 | 
			
		||||
        category: CommandCategories.actions,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user