+ { warning }
{ _t(
"Debug logs contain application usage data including your " +
diff --git a/src/rageshake/submit-rageshake.js b/src/rageshake/submit-rageshake.js
index 00ef87f89c..2c529ea0b9 100644
--- a/src/rageshake/submit-rageshake.js
+++ b/src/rageshake/submit-rageshake.js
@@ -136,6 +136,13 @@ export default async function sendBugReport(bugReportEndpoint, opts) {
} catch (e) {}
}
+ if (window.Modernizr) {
+ const missingFeatures = Object.keys(window.Modernizr).filter(key => window.Modernizr[key] === false);
+ if (missingFeatures.length > 0) {
+ body.append("modernizr_missing_features", missingFeatures.join(", "));
+ }
+ }
+
if (opts.sendLogs) {
progressCallback(_t("Collecting logs"));
const logs = await rageshake.getLogsForReport();
From 0165ff0bc9b2c9c44a400f72d1c1ab1fb7ab574b Mon Sep 17 00:00:00 2001
From: Travis Ralston
Date: Thu, 9 Apr 2020 16:02:49 -0600
Subject: [PATCH 0024/1031] Allow iframes and Jitsi URLs in /addwidget
Fixes https://github.com/vector-im/riot-web/issues/12784
---
package.json | 1 +
src/SlashCommands.tsx | 44 ++++++++--
src/widgets/Jitsi.ts | 22 +++++
yarn.lock | 200 ++++--------------------------------------
4 files changed, 78 insertions(+), 189 deletions(-)
diff --git a/package.json b/package.json
index 616f3f541e..2bf2b7c5a9 100644
--- a/package.json
+++ b/package.json
@@ -82,6 +82,7 @@
"matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop",
"minimist": "^1.2.0",
"pako": "^1.0.5",
+ "parse5": "^5.1.1",
"png-chunks-extract": "^1.0.0",
"project-name-generator": "^2.1.7",
"prop-types": "^15.5.8",
diff --git a/src/SlashCommands.tsx b/src/SlashCommands.tsx
index 0afea63a78..ff9ebbc70a 100644
--- a/src/SlashCommands.tsx
+++ b/src/SlashCommands.tsx
@@ -36,6 +36,8 @@ import { getDefaultIdentityServerUrl, useDefaultIdentityServer } from './utils/I
import {isPermalinkHost, parsePermalink} from "./utils/permalinks/Permalinks";
import {inviteUsersToRoom} from "./RoomInvite";
import { WidgetType } from "./widgets/WidgetType";
+import { Jitsi } from "./widgets/Jitsi";
+import { parseFragment as parseHtml } from "parse5";
// XXX: workaround for https://github.com/microsoft/TypeScript/issues/31816
interface HTMLInputEvent extends Event {
@@ -765,18 +767,50 @@ export const Commands = [
}),
new Command({
command: 'addwidget',
- args: '',
+ args: '',
description: _td('Adds a custom widget by URL to the room'),
- runFn: function(roomId, args) {
- if (!args || (!args.startsWith("https://") && !args.startsWith("http://"))) {
+ runFn: function(roomId, widgetUrl) {
+ if (!widgetUrl) {
+ return reject(_t("Please supply a widget URL or embed code"));
+ }
+
+ // Try and parse out a widget URL from iframes
+ if (widgetUrl.toLowerCase().startsWith("
);
}
- const classes = classNames("mx_BasicMessageComposer", {
+ const wrapperClasses = classNames("mx_BasicMessageComposer", {
"mx_BasicMessageComposer_input_error": this.state.showVisualBell,
});
+ const classes = classNames("mx_BasicMessageComposer_input", {
+ "mx_BasicMessageComposer_input_shouldShowPillAvatar": this.state.showPillAvatar,
+ });
const MessageComposerFormatBar = sdk.getComponent('rooms.MessageComposerFormatBar');
const shortcuts = {
@@ -618,11 +630,11 @@ export default class BasicMessageEditor extends React.Component {
const {completionIndex} = this.state;
- return (