From c48994e981afb95893b010eadcc0cc4e91551fac Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Fri, 17 Nov 2017 13:56:56 +0000 Subject: [PATCH 1/7] Flairstore: Fix broken reference --- src/stores/FlairStore.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stores/FlairStore.js b/src/stores/FlairStore.js index 0f339eaf63..5286c40e39 100644 --- a/src/stores/FlairStore.js +++ b/src/stores/FlairStore.js @@ -95,7 +95,7 @@ class FlairStore extends EventEmitter { // Return silently to avoid spamming for non-supporting servers return; } - console.error('Could not get groups for user', this.props.userId, err); + console.error('Could not get groups for user', userId, err); throw err; }).finally(() => { delete this._usersInFlight[userId]; From 6d23182f5ff8f675876c9cfa62d15cf34e7eb476 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 17 Nov 2017 14:54:44 +0000 Subject: [PATCH 2/7] Fix the force TURN option The call object is created within the js-sdk for inbound calls, so we never got the chance to set it. --- src/CallHandler.js | 5 +---- src/MatrixClientPeg.js | 4 ++++ src/components/structures/UserSettings.js | 5 +++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/CallHandler.js b/src/CallHandler.js index a9539d40e1..dd9d93709f 100644 --- a/src/CallHandler.js +++ b/src/CallHandler.js @@ -52,7 +52,6 @@ limitations under the License. */ import MatrixClientPeg from './MatrixClientPeg'; -import UserSettingsStore from './UserSettingsStore'; import PlatformPeg from './PlatformPeg'; import Modal from './Modal'; import sdk from './index'; @@ -245,9 +244,7 @@ function _onAction(payload) { return; } else if (members.length === 2) { console.log("Place %s call in %s", payload.type, payload.room_id); - const call = Matrix.createNewMatrixCall(MatrixClientPeg.get(), payload.room_id, { - forceTURN: UserSettingsStore.getLocalSetting('webRtcForceTURN', false), - }); + const call = Matrix.createNewMatrixCall(MatrixClientPeg.get(), payload.room_id); placeCall(call); } else { // > 2 dis.dispatch({ diff --git a/src/MatrixClientPeg.js b/src/MatrixClientPeg.js index 0c3d5b3775..6135a91dea 100644 --- a/src/MatrixClientPeg.js +++ b/src/MatrixClientPeg.js @@ -136,6 +136,9 @@ class MatrixClientPeg { } _createClient(creds: MatrixClientCreds) { + // XXX: This is here and as a require because apparently circular dependencies + // are just broken in webpack (https://github.com/webpack/webpack/issues/1788) + const UserSettingsStore = require('./UserSettingsStore'); const opts = { baseUrl: creds.homeserverUrl, idBaseUrl: creds.identityServerUrl, @@ -143,6 +146,7 @@ class MatrixClientPeg { userId: creds.userId, deviceId: creds.deviceId, timelineSupport: true, + forceTURN: UserSettingsStore.getLocalSetting('webRtcForceTURN', false), }; this.matrixClient = createMatrixClient(opts, this.indexedDbWorkerScript); diff --git a/src/components/structures/UserSettings.js b/src/components/structures/UserSettings.js index 68ea932f93..7d45179a1b 100644 --- a/src/components/structures/UserSettings.js +++ b/src/components/structures/UserSettings.js @@ -877,6 +877,11 @@ module.exports = React.createClass({ // TODO: this ought to be a separate component so that we don't need // to rebind the onChange each time we render const onChange = (e) => { + // XXX: awful, but at time of writing, granular settings has landed on + // develop which will almost certainly mean we'll handle this differently. + if (setting.id === 'webRtcForceTURN') { + MatrixClientPeg.get().setForceTURN(e.target.checked); + } UserSettingsStore.setLocalSetting(setting.id, e.target.checked); if (setting.fn) setting.fn(e.target.checked); }; From 8bd040a443084b09a694204639cf44ee819abaee Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 17 Nov 2017 15:58:05 +0000 Subject: [PATCH 3/7] Released js-sdk --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 414275cccc..4b8c49bbbd 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "isomorphic-fetch": "^2.2.1", "linkifyjs": "^2.1.3", "lodash": "^4.13.1", - "matrix-js-sdk": "0.9.0", + "matrix-js-sdk": "0.9.1", "optimist": "^0.6.1", "prop-types": "^15.5.8", "querystring": "^0.2.0", From c32b42886bcf44bd6ebf44721575534a27ac92fe Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 17 Nov 2017 16:03:50 +0000 Subject: [PATCH 4/7] Prepare changelog for v0.11.1 --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86a1002a48..9c0ea57a57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +Changes in [0.11.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.11.1) (2017-11-17) +===================================================================================================== +[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.11.0...v0.11.1) + + * Fix the force TURN option + [\#1621](https://github.com/matrix-org/matrix-react-sdk/pull/1621) + Changes in [0.11.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.11.0) (2017-11-15) ===================================================================================================== [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.11.0-rc.3...v0.11.0) From 394e450526dddade1c3b224e5b48f980fefdf738 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 17 Nov 2017 16:03:50 +0000 Subject: [PATCH 5/7] v0.11.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4b8c49bbbd..2970beb6b3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matrix-react-sdk", - "version": "0.11.0", + "version": "0.11.1", "description": "SDK for matrix.org using React", "author": "matrix.org", "repository": { From cdf5a6fb8a5a23adf1853ae84085addfad2823e7 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 17 Nov 2017 22:02:33 -0700 Subject: [PATCH 6/7] Fix typo that prevented URL previews on a room-account level from being saved Signed-off-by: Travis Ralston --- src/components/views/room_settings/UrlPreviewSettings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/room_settings/UrlPreviewSettings.js b/src/components/views/room_settings/UrlPreviewSettings.js index 6491bb0e09..821e4d0ebc 100644 --- a/src/components/views/room_settings/UrlPreviewSettings.js +++ b/src/components/views/room_settings/UrlPreviewSettings.js @@ -31,7 +31,7 @@ module.exports = React.createClass({ saveSettings: function() { const promises = []; if (this.refs.urlPreviewsRoom) promises.push(this.refs.urlPreviewsRoom.save()); - if (this.refs.urlPrviewsSelf) promises.push(this.refs.urlPreviewsSelf.save()); + if (this.refs.urlPreviewsSelf) promises.push(this.refs.urlPreviewsSelf.save()); return promises; }, From d010329f4ab531f6f0d8c922abe5aef99592108e Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 17 Nov 2017 22:03:06 -0700 Subject: [PATCH 7/7] Make the room-level URL preview notification explicit Fixes https://github.com/vector-im/riot-web/issues/5638 Signed-off-by: Travis Ralston --- src/components/views/room_settings/UrlPreviewSettings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/room_settings/UrlPreviewSettings.js b/src/components/views/room_settings/UrlPreviewSettings.js index 821e4d0ebc..e4a8c9d353 100644 --- a/src/components/views/room_settings/UrlPreviewSettings.js +++ b/src/components/views/room_settings/UrlPreviewSettings.js @@ -64,7 +64,7 @@ module.exports = React.createClass({ ); } else { let str = _td("URL previews are enabled by default for participants in this room."); - if (!SettingsStore.getValueAt(SettingLevel.ROOM, "urlPreviewsEnabled")) { + if (!SettingsStore.getValueAt(SettingLevel.ROOM, "urlPreviewsEnabled", roomId, /*explicit=*/true)) { str = _td("URL previews are disabled by default for participants in this room."); } previewsForRoom = ();