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 
			
		
		
		
	Fix widgets for all other sources too
This commit is contained in:
		@@ -35,6 +35,7 @@ import { abbreviateUrl } from './utils/UrlUtils';
 | 
			
		||||
import { getDefaultIdentityServerUrl, useDefaultIdentityServer } from './utils/IdentityServerUtils';
 | 
			
		||||
import {isPermalinkHost, parsePermalink} from "./utils/permalinks/Permalinks";
 | 
			
		||||
import {inviteUsersToRoom} from "./RoomInvite";
 | 
			
		||||
import { WidgetType } from "./widgets/WidgetType";
 | 
			
		||||
 | 
			
		||||
// XXX: workaround for https://github.com/microsoft/TypeScript/issues/31816
 | 
			
		||||
interface HTMLInputEvent extends Event {
 | 
			
		||||
@@ -775,7 +776,7 @@ export const Commands = [
 | 
			
		||||
                const nowMs = (new Date()).getTime();
 | 
			
		||||
                const widgetId = encodeURIComponent(`${roomId}_${userId}_${nowMs}`);
 | 
			
		||||
                return success(WidgetUtils.setRoomWidget(
 | 
			
		||||
                    roomId, widgetId, "m.custom", args, "Custom Widget", {}));
 | 
			
		||||
                    roomId, widgetId, WidgetType.CUSTOM, args, "Custom Widget", {}));
 | 
			
		||||
            } else {
 | 
			
		||||
                return reject(_t("You cannot modify widgets in this room."));
 | 
			
		||||
            }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user