From e3065f5a02533c38f0a7b770c519c5314d27880d Mon Sep 17 00:00:00 2001 From: Robin Townsend Date: Fri, 26 Feb 2021 17:09:54 -0500 Subject: [PATCH 01/13] Support sending invite reasons with MultiInviter Signed-off-by: Robin Townsend --- src/utils/MultiInviter.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils/MultiInviter.js b/src/utils/MultiInviter.js index 7d1c900360..63d3942b37 100644 --- a/src/utils/MultiInviter.js +++ b/src/utils/MultiInviter.js @@ -53,13 +53,15 @@ export default class MultiInviter { * instance of the class. * * @param {array} addrs Array of addresses to invite + * @param {string} reason Reason for inviting (optional) * @returns {Promise} Resolved when all invitations in the queue are complete */ - invite(addrs) { + invite(addrs, reason) { if (this.addrs.length > 0) { throw new Error("Already inviting/invited"); } this.addrs.push(...addrs); + this.reason = reason; for (const addr of this.addrs) { if (getAddressType(addr) === null) { @@ -123,7 +125,7 @@ export default class MultiInviter { } } - return MatrixClientPeg.get().invite(roomId, addr); + return MatrixClientPeg.get().invite(roomId, addr, undefined, this.reason); } else { throw new Error('Unsupported address'); } From c25a8b70fa051afe102a301d146448f44cd51c3d Mon Sep 17 00:00:00 2001 From: Robin Townsend Date: Fri, 26 Feb 2021 17:10:20 -0500 Subject: [PATCH 02/13] Support sending invite reasons with /invite command Signed-off-by: Robin Townsend --- src/SlashCommands.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/SlashCommands.tsx b/src/SlashCommands.tsx index 6b5f261374..aedcf7af8c 100644 --- a/src/SlashCommands.tsx +++ b/src/SlashCommands.tsx @@ -441,15 +441,14 @@ export const Commands = [ }), new Command({ command: 'invite', - args: '', + args: ' []', description: _td('Invites user with given id to current room'), runFn: function(roomId, args) { if (args) { - const matches = args.match(/^(\S+)$/); - if (matches) { + const [address, reason] = args.split(/\s+(.+)/); + if (address) { // We use a MultiInviter to re-use the invite logic, even though // we're only inviting one user. - const address = matches[1]; // If we need an identity server but don't have one, things // get a bit more complex here, but we try to show something // meaningful. @@ -490,7 +489,7 @@ export const Commands = [ } const inviter = new MultiInviter(roomId); return success(prom.then(() => { - return inviter.invite([address]); + return inviter.invite([address], reason); }).then(() => { if (inviter.getCompletionState(address) !== "invited") { throw new Error(inviter.getErrorText(address)); From ae08f74336d3aa24988f7f3dba7d817cd5c96741 Mon Sep 17 00:00:00 2001 From: Panagiotis <27917356+panoschal@users.noreply.github.com> Date: Wed, 3 Mar 2021 22:38:30 +0200 Subject: [PATCH 03/13] feat: improve "view source" display encrypted and decrypted event source on the same dialog keep only one "View Source" action on event context menu --- res/css/structures/_ViewSource.scss | 11 ++++++- src/components/structures/ViewSource.js | 32 ++++++++++++++----- .../views/context_menus/MessageContextMenu.js | 12 ++----- .../views/dialogs/RoomSettingsDialog.js | 2 +- .../views/dialogs/UserSettingsDialog.js | 2 +- src/i18n/strings/en_EN.json | 4 ++- src/i18n/strings/en_US.json | 4 ++- 7 files changed, 44 insertions(+), 23 deletions(-) diff --git a/res/css/structures/_ViewSource.scss b/res/css/structures/_ViewSource.scss index 421d1f03cd..0cb5dd8f3a 100644 --- a/res/css/structures/_ViewSource.scss +++ b/res/css/structures/_ViewSource.scss @@ -22,9 +22,18 @@ limitations under the License. float: right; } -.mx_ViewSource_label_bottom { +.mx_ViewSource_separator { clear: both; border-bottom: 1px solid #e5e5e5; + padding-top: 0.7em; + padding-bottom: 0.7em; +} + +.mx_ViewSource_heading { + font-size: $font-17px; + font-weight: 400; + color: $primary-fg-color; + margin-top: 0.7em; } .mx_ViewSource pre { diff --git a/src/components/structures/ViewSource.js b/src/components/structures/ViewSource.js index 0b969784e5..866f2e0a0b 100644 --- a/src/components/structures/ViewSource.js +++ b/src/components/structures/ViewSource.js @@ -19,7 +19,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import SyntaxHighlight from '../views/elements/SyntaxHighlight'; -import {_t} from "../../languageHandler"; +import {_t, _td} from "../../languageHandler"; import * as sdk from "../../index"; @@ -29,20 +29,36 @@ export default class ViewSource extends React.Component { onFinished: PropTypes.func.isRequired, roomId: PropTypes.string.isRequired, eventId: PropTypes.string.isRequired, + isEncrypted: PropTypes.bool.isRequired, + decryptedContent: PropTypes.object, }; render() { const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog'); + + const DecryptedSection = <> +
+
{_t("Decrypted event source")}
+ + { JSON.stringify(this.props.decryptedContent, null, 2) } + + ; + + const OriginalSection = <> +
+
{_t("Original event source")}
+ + { JSON.stringify(this.props.content, null, 2) } + + ; + return ( -
Room ID: { this.props.roomId }
-
Event ID: { this.props.eventId }
-
-
- - { JSON.stringify(this.props.content, null, 2) } - +
Room ID: { this.props.roomId }
+
Event ID: { this.props.eventId }
+ { this.props.isEncrypted && DecryptedSection } + { OriginalSection }
); diff --git a/src/components/views/context_menus/MessageContextMenu.js b/src/components/views/context_menus/MessageContextMenu.js index 6b871e4f24..b002d1ec62 100644 --- a/src/components/views/context_menus/MessageContextMenu.js +++ b/src/components/views/context_menus/MessageContextMenu.js @@ -130,6 +130,8 @@ export default class MessageContextMenu extends React.Component { roomId: ev.getRoomId(), eventId: ev.getId(), content: ev.event, + isEncrypted: this.props.mxEvent.getType() !== this.props.mxEvent.getWireType(), + decryptedContent: ev._clearEvent, }, 'mx_Dialog_viewsource'); this.closeMenu(); }; @@ -309,7 +311,6 @@ export default class MessageContextMenu extends React.Component { let cancelButton; let forwardButton; let pinButton; - let viewClearSourceButton; let unhidePreviewButton; let externalURLButton; let quoteButton; @@ -389,14 +390,6 @@ export default class MessageContextMenu extends React.Component { ); - if (mxEvent.getType() !== mxEvent.getWireType()) { - viewClearSourceButton = ( - - { _t('View Decrypted Source') } - - ); - } - if (this.props.eventTileOps) { if (this.props.eventTileOps.isWidgetHidden()) { unhidePreviewButton = ( @@ -481,7 +474,6 @@ export default class MessageContextMenu extends React.Component { { forwardButton } { pinButton } { viewSourceButton } - { viewClearSourceButton } { unhidePreviewButton } { permalinkButton } { quoteButton } diff --git a/src/components/views/dialogs/RoomSettingsDialog.js b/src/components/views/dialogs/RoomSettingsDialog.js index 9d9313f08f..368f2aeccd 100644 --- a/src/components/views/dialogs/RoomSettingsDialog.js +++ b/src/components/views/dialogs/RoomSettingsDialog.js @@ -116,7 +116,7 @@ export default class RoomSettingsDialog extends React.Component { return ( -
+
diff --git a/src/components/views/dialogs/UserSettingsDialog.js b/src/components/views/dialogs/UserSettingsDialog.js index 7164540aea..3291fa2387 100644 --- a/src/components/views/dialogs/UserSettingsDialog.js +++ b/src/components/views/dialogs/UserSettingsDialog.js @@ -155,7 +155,7 @@ export default class UserSettingsDialog extends React.Component { return ( -
+
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index fa7f446b7c..b777adcf0c 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -2875,5 +2875,7 @@ "Esc": "Esc", "Enter": "Enter", "Space": "Space", - "End": "End" + "End": "End", + "Decrypted event source": "Decrypted event source", + "Original event source": "Original event source" } diff --git a/src/i18n/strings/en_US.json b/src/i18n/strings/en_US.json index a1275fb089..9dc6d18f8a 100644 --- a/src/i18n/strings/en_US.json +++ b/src/i18n/strings/en_US.json @@ -650,5 +650,7 @@ "Error upgrading room": "Error upgrading room", "Double check that your server supports the room version chosen and try again.": "Double check that your server supports the room version chosen and try again.", "Changes the avatar of the current room": "Changes the avatar of the current room", - "Changes your avatar in all rooms": "Changes your avatar in all rooms" + "Changes your avatar in all rooms": "Changes your avatar in all rooms", + "Decrypted event source": "Decrypted event source", + "Original event source": "Original event source" } From 0a1f372371a73736a720deface3564be172a9953 Mon Sep 17 00:00:00 2001 From: Panagiotis <27917356+panoschal@users.noreply.github.com> Date: Wed, 3 Mar 2021 23:26:31 +0200 Subject: [PATCH 04/13] fix: lint --- src/components/structures/ViewSource.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/structures/ViewSource.js b/src/components/structures/ViewSource.js index 866f2e0a0b..b57efe1dd3 100644 --- a/src/components/structures/ViewSource.js +++ b/src/components/structures/ViewSource.js @@ -19,7 +19,7 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import SyntaxHighlight from '../views/elements/SyntaxHighlight'; -import {_t, _td} from "../../languageHandler"; +import {_t} from "../../languageHandler"; import * as sdk from "../../index"; From 6d792cc08cec87e5ad6a856c5e4c9e593ac974df Mon Sep 17 00:00:00 2001 From: Panagiotis <27917356+panoschal@users.noreply.github.com> Date: Wed, 3 Mar 2021 23:48:39 +0200 Subject: [PATCH 05/13] feat: use
to hide encrypted block --- res/css/structures/_ViewSource.scss | 4 +++ src/components/structures/ViewSource.js | 47 ++++++++++++++++--------- 2 files changed, 34 insertions(+), 17 deletions(-) diff --git a/res/css/structures/_ViewSource.scss b/res/css/structures/_ViewSource.scss index 0cb5dd8f3a..0126c16599 100644 --- a/res/css/structures/_ViewSource.scss +++ b/res/css/structures/_ViewSource.scss @@ -43,3 +43,7 @@ limitations under the License. word-wrap: break-word; white-space: pre-wrap; } + +.mx_ViewSource_details { + margin-top: 0.8em; +} diff --git a/src/components/structures/ViewSource.js b/src/components/structures/ViewSource.js index b57efe1dd3..ca6c0d4226 100644 --- a/src/components/structures/ViewSource.js +++ b/src/components/structures/ViewSource.js @@ -36,29 +36,42 @@ export default class ViewSource extends React.Component { render() { const BaseDialog = sdk.getComponent('views.dialogs.BaseDialog'); - const DecryptedSection = <> -
-
{_t("Decrypted event source")}
- - { JSON.stringify(this.props.decryptedContent, null, 2) } - - ; - - const OriginalSection = <> -
-
{_t("Original event source")}
- - { JSON.stringify(this.props.content, null, 2) } - - ; + let content; + if (this.props.isEncrypted) { + content = <> +
+ + {_t("Decrypted event source")} + + + { JSON.stringify(this.props.decryptedContent, null, 2) } + +
+
+ + {_t("Original event source")} + + + { JSON.stringify(this.props.content, null, 2) } + +
+ ; + } else { + content = <> +
{_t("Original event source")}
+ + { JSON.stringify(this.props.content, null, 2) } + + ; + } return (
Room ID: { this.props.roomId }
Event ID: { this.props.eventId }
- { this.props.isEncrypted && DecryptedSection } - { OriginalSection } +
+ { content }
); From 725162ee0012c85111859fa54c9058462945e761 Mon Sep 17 00:00:00 2001 From: Panagiotis <27917356+panoschal@users.noreply.github.com> Date: Thu, 4 Mar 2021 00:09:00 +0200 Subject: [PATCH 06/13] fix: i18n strings --- src/i18n/strings/en_EN.json | 7 +++---- src/i18n/strings/en_US.json | 4 +--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index b777adcf0c..c3752d7942 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -2396,7 +2396,6 @@ "Cancel Sending": "Cancel Sending", "Forward Message": "Forward Message", "Pin Message": "Pin Message", - "View Decrypted Source": "View Decrypted Source", "Unhide Preview": "Unhide Preview", "Share Permalink": "Share Permalink", "Share Message": "Share Message", @@ -2652,6 +2651,8 @@ "User menu": "User menu", "Community and user menu": "Community and user menu", "Could not load user profile": "Could not load user profile", + "Decrypted event source": "Decrypted event source", + "Original event source": "Original event source", "Verify this login": "Verify this login", "Session verified": "Session verified", "Failed to send email": "Failed to send email", @@ -2875,7 +2876,5 @@ "Esc": "Esc", "Enter": "Enter", "Space": "Space", - "End": "End", - "Decrypted event source": "Decrypted event source", - "Original event source": "Original event source" + "End": "End" } diff --git a/src/i18n/strings/en_US.json b/src/i18n/strings/en_US.json index 9dc6d18f8a..a1275fb089 100644 --- a/src/i18n/strings/en_US.json +++ b/src/i18n/strings/en_US.json @@ -650,7 +650,5 @@ "Error upgrading room": "Error upgrading room", "Double check that your server supports the room version chosen and try again.": "Double check that your server supports the room version chosen and try again.", "Changes the avatar of the current room": "Changes the avatar of the current room", - "Changes your avatar in all rooms": "Changes your avatar in all rooms", - "Decrypted event source": "Decrypted event source", - "Original event source": "Original event source" + "Changes your avatar in all rooms": "Changes your avatar in all rooms" } From dd792c3d7329400bf67c95cf671190203d54afd7 Mon Sep 17 00:00:00 2001 From: Ayush Kumar <2580ayush2580@gmail.com> Date: Thu, 4 Mar 2021 19:24:35 +0530 Subject: [PATCH 07/13] Fix Clicking on the avatar for opening member info requires pixel-perfect accuracy --- res/css/views/rooms/_GroupLayout.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/css/views/rooms/_GroupLayout.scss b/res/css/views/rooms/_GroupLayout.scss index 903fabc8fd..818509785b 100644 --- a/res/css/views/rooms/_GroupLayout.scss +++ b/res/css/views/rooms/_GroupLayout.scss @@ -21,7 +21,7 @@ $left-gutter: 64px; .mx_EventTile { > .mx_SenderProfile { line-height: $font-20px; - padding-left: $left-gutter; + margin-left: $left-gutter; } > .mx_EventTile_line { From 2c64dac5140004e41623d3337d163a9ed1d0babb Mon Sep 17 00:00:00 2001 From: Panagiotis <27917356+panoschal@users.noreply.github.com> Date: Fri, 5 Mar 2021 19:57:37 +0200 Subject: [PATCH 08/13] fix: show decrypted source on EditHistory -> ViewSource pass correct props to the component --- src/components/views/messages/EditHistoryMessage.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/views/messages/EditHistoryMessage.js b/src/components/views/messages/EditHistoryMessage.js index df27773a40..68a3c95745 100644 --- a/src/components/views/messages/EditHistoryMessage.js +++ b/src/components/views/messages/EditHistoryMessage.js @@ -77,6 +77,8 @@ export default class EditHistoryMessage extends React.PureComponent { roomId: this.props.mxEvent.getRoomId(), eventId: this.props.mxEvent.getId(), content: this.props.mxEvent.event, + isEncrypted: this.props.mxEvent.getType() !== this.props.mxEvent.getWireType(), + decryptedContent: this.props.mxEvent._clearEvent, }, 'mx_Dialog_viewsource'); }; From 92c8b697d21607cb9a5e3093d0db550f1bc2dfd5 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 8 Mar 2021 18:55:33 +0000 Subject: [PATCH 09/13] Fix units of TURN server expiry time --- src/CallHandler.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CallHandler.tsx b/src/CallHandler.tsx index 8621f441de..d2564e637b 100644 --- a/src/CallHandler.tsx +++ b/src/CallHandler.tsx @@ -630,7 +630,7 @@ export default class CallHandler { logger.debug("Mapped real room " + roomId + " to room ID " + mappedRoomId); const timeUntilTurnCresExpire = MatrixClientPeg.get().getTurnServersExpiry() - Date.now(); - console.log("Current turn creds expire in " + timeUntilTurnCresExpire + " seconds"); + console.log("Current turn creds expire in " + timeUntilTurnCresExpire + " ms"); const call = createNewMatrixCall(MatrixClientPeg.get(), mappedRoomId); this.calls.set(roomId, call); From 7963d7f49ebc7da5387bd8037f14ce13ae4f55cd Mon Sep 17 00:00:00 2001 From: Panagiotis <27917356+panoschal@users.noreply.github.com> Date: Mon, 8 Mar 2021 21:21:37 +0200 Subject: [PATCH 10/13] address PR comments cleanup, change to isEncrypted, comments --- .../views/context_menus/MessageContextMenu.js | 15 ++------------- .../views/messages/EditHistoryMessage.js | 3 ++- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/src/components/views/context_menus/MessageContextMenu.js b/src/components/views/context_menus/MessageContextMenu.js index b002d1ec62..98d0aad578 100644 --- a/src/components/views/context_menus/MessageContextMenu.js +++ b/src/components/views/context_menus/MessageContextMenu.js @@ -130,20 +130,9 @@ export default class MessageContextMenu extends React.Component { roomId: ev.getRoomId(), eventId: ev.getId(), content: ev.event, - isEncrypted: this.props.mxEvent.getType() !== this.props.mxEvent.getWireType(), - decryptedContent: ev._clearEvent, - }, 'mx_Dialog_viewsource'); - this.closeMenu(); - }; - - onViewClearSourceClick = () => { - const ev = this.props.mxEvent.replacingEvent() || this.props.mxEvent; - const ViewSource = sdk.getComponent('structures.ViewSource'); - Modal.createTrackedDialog('View Clear Event Source', '', ViewSource, { - roomId: ev.getRoomId(), - eventId: ev.getId(), + isEncrypted: ev.isEncrypted(), // FIXME: _clearEvent is private - content: ev._clearEvent, + decryptedContent: ev._clearEvent, }, 'mx_Dialog_viewsource'); this.closeMenu(); }; diff --git a/src/components/views/messages/EditHistoryMessage.js b/src/components/views/messages/EditHistoryMessage.js index 68a3c95745..f37efe4800 100644 --- a/src/components/views/messages/EditHistoryMessage.js +++ b/src/components/views/messages/EditHistoryMessage.js @@ -77,7 +77,8 @@ export default class EditHistoryMessage extends React.PureComponent { roomId: this.props.mxEvent.getRoomId(), eventId: this.props.mxEvent.getId(), content: this.props.mxEvent.event, - isEncrypted: this.props.mxEvent.getType() !== this.props.mxEvent.getWireType(), + isEncrypted: this.props.mxEvent.isEncrypted(), + // FIXME: _clearEvent is private decryptedContent: this.props.mxEvent._clearEvent, }, 'mx_Dialog_viewsource'); }; From 92af111c930a067af0a287338f173cb1b876fb3e Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 8 Mar 2021 19:19:52 -0700 Subject: [PATCH 11/13] Fix types for replaceableComponent This is to make it work in TS files --- src/utils/replaceableComponent.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils/replaceableComponent.ts b/src/utils/replaceableComponent.ts index 8c29fdf037..f8dd5f8ac6 100644 --- a/src/utils/replaceableComponent.ts +++ b/src/utils/replaceableComponent.ts @@ -30,9 +30,11 @@ import * as sdk from '../index'; * @param {string} name The dot-path name of the component being replaced. * @param {React.Component} origComponent The component that can be replaced * with a skinned version. If no skinned version is available, this component - * will be used. + * will be used. Note that this is automatically provided to the function and + * thus is optional for purposes of types. + * @returns {ClassDecorator} The decorator. */ -export function replaceableComponent(name: string, origComponent: React.Component) { +export function replaceableComponent(name: string, origComponent?: React.Component): ClassDecorator { // Decorators return a function to override the class (origComponent). This // ultimately assumes that `getComponent()` won't throw an error and instead // return a falsey value like `null` when the skin doesn't have a component. From a5f237dfd6094decab5defe71c75ba608973d262 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 8 Mar 2021 19:33:10 -0700 Subject: [PATCH 12/13] Make debugging skinning problems easier --- src/Skinner.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Skinner.js b/src/Skinner.js index d17bc1782a..ef340e4052 100644 --- a/src/Skinner.js +++ b/src/Skinner.js @@ -23,7 +23,7 @@ class Skinner { if (!name) throw new Error(`Invalid component name: ${name}`); if (this.components === null) { throw new Error( - "Attempted to get a component before a skin has been loaded."+ + `Attempted to get a component (${name}) before a skin has been loaded.`+ " This is probably because either:"+ " a) Your app has not called sdk.loadSkin(), or"+ " b) A component has called getComponent at the root level", From 591ccabab91e0ab5d30cc23acaca56c01c57858a Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 8 Mar 2021 20:26:08 -0700 Subject: [PATCH 13/13] Remove a bunch of useless 'use strict' definitions --- src/components/structures/EmbeddedPage.js | 2 -- src/components/views/auth/AuthBody.js | 2 -- src/components/views/auth/AuthHeaderLogo.js | 2 -- src/components/views/auth/CompleteSecurityBody.js | 2 -- src/components/views/elements/Flair.js | 2 -- src/components/views/messages/MAudioBody.js | 2 -- src/notifications/VectorPushRulesDefinitions.js | 2 -- src/notifications/index.js | 2 -- src/utils/MegolmExportEncryption.js | 2 -- test/test-utils.js | 2 -- test/utils/MegolmExportEncryption-test.js | 2 -- 11 files changed, 22 deletions(-) diff --git a/src/components/structures/EmbeddedPage.js b/src/components/structures/EmbeddedPage.js index cbfeff7582..c37ab3df48 100644 --- a/src/components/structures/EmbeddedPage.js +++ b/src/components/structures/EmbeddedPage.js @@ -16,8 +16,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -'use strict'; - import React from 'react'; import PropTypes from 'prop-types'; import request from 'browser-request'; diff --git a/src/components/views/auth/AuthBody.js b/src/components/views/auth/AuthBody.js index 9a078efb52..7881486a5f 100644 --- a/src/components/views/auth/AuthBody.js +++ b/src/components/views/auth/AuthBody.js @@ -14,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -'use strict'; - import React from 'react'; export default class AuthBody extends React.PureComponent { diff --git a/src/components/views/auth/AuthHeaderLogo.js b/src/components/views/auth/AuthHeaderLogo.js index 9edf149a83..2f27885322 100644 --- a/src/components/views/auth/AuthHeaderLogo.js +++ b/src/components/views/auth/AuthHeaderLogo.js @@ -14,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -'use strict'; - import React from 'react'; export default class AuthHeaderLogo extends React.PureComponent { diff --git a/src/components/views/auth/CompleteSecurityBody.js b/src/components/views/auth/CompleteSecurityBody.js index d757de9fe0..734af3192c 100644 --- a/src/components/views/auth/CompleteSecurityBody.js +++ b/src/components/views/auth/CompleteSecurityBody.js @@ -14,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -'use strict'; - import React from 'react'; export default class CompleteSecurityBody extends React.PureComponent { diff --git a/src/components/views/elements/Flair.js b/src/components/views/elements/Flair.js index 0f06904b68..645444b300 100644 --- a/src/components/views/elements/Flair.js +++ b/src/components/views/elements/Flair.js @@ -14,8 +14,6 @@ limitations under the License. */ -'use strict'; - import React from 'react'; import PropTypes from 'prop-types'; import FlairStore from '../../../stores/FlairStore'; diff --git a/src/components/views/messages/MAudioBody.js b/src/components/views/messages/MAudioBody.js index 587dee4513..ac42b485d7 100644 --- a/src/components/views/messages/MAudioBody.js +++ b/src/components/views/messages/MAudioBody.js @@ -14,8 +14,6 @@ limitations under the License. */ -'use strict'; - import React from 'react'; import MFileBody from './MFileBody'; diff --git a/src/notifications/VectorPushRulesDefinitions.js b/src/notifications/VectorPushRulesDefinitions.js index 98d197a004..c049a81c15 100644 --- a/src/notifications/VectorPushRulesDefinitions.js +++ b/src/notifications/VectorPushRulesDefinitions.js @@ -15,8 +15,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -'use strict'; - import { _td } from '../languageHandler'; import {StandardActions} from "./StandardActions"; import {PushRuleVectorState} from "./PushRuleVectorState"; diff --git a/src/notifications/index.js b/src/notifications/index.js index 7c400ad8b3..96c176303b 100644 --- a/src/notifications/index.js +++ b/src/notifications/index.js @@ -15,8 +15,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -'use strict'; - export * from "./NotificationUtils"; export * from "./PushRuleVectorState"; export * from "./VectorPushRulesDefinitions"; diff --git a/src/utils/MegolmExportEncryption.js b/src/utils/MegolmExportEncryption.js index cde20a0eb2..be7472901a 100644 --- a/src/utils/MegolmExportEncryption.js +++ b/src/utils/MegolmExportEncryption.js @@ -15,8 +15,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -"use strict"; - // polyfill textencoder if necessary import * as TextEncodingUtf8 from 'text-encoding-utf-8'; let TextEncoder = window.TextEncoder; diff --git a/test/test-utils.js b/test/test-utils.js index 839e1d6cd8..b6e0468d86 100644 --- a/test/test-utils.js +++ b/test/test-utils.js @@ -1,5 +1,3 @@ -"use strict"; - import React from 'react'; import {MatrixClientPeg as peg} from '../src/MatrixClientPeg'; import dis from '../src/dispatcher/dispatcher'; diff --git a/test/utils/MegolmExportEncryption-test.js b/test/utils/MegolmExportEncryption-test.js index 1fd305b0a6..e0ed5ba26a 100644 --- a/test/utils/MegolmExportEncryption-test.js +++ b/test/utils/MegolmExportEncryption-test.js @@ -14,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -"use strict"; - import {TextEncoder} from "util"; import nodeCrypto from "crypto"; import { Crypto } from "@peculiar/webcrypto";