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) diff --git a/package.json b/package.json index 414275cccc..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": { @@ -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", diff --git a/src/CallHandler.js b/src/CallHandler.js index 7dbd0c899b..dd9d93709f 100644 --- a/src/CallHandler.js +++ b/src/CallHandler.js @@ -58,7 +58,6 @@ import sdk from './index'; import { _t } from './languageHandler'; import Matrix from 'matrix-js-sdk'; import dis from './dispatcher'; -import SettingsStore from "./settings/SettingsStore"; global.mxCalls = { //room_id: MatrixCall @@ -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: SettingsStore.getValue('webRtcForceTURN'), - }); + 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 86b38d4150..a6012f5213 100644 --- a/src/MatrixClientPeg.js +++ b/src/MatrixClientPeg.js @@ -21,6 +21,7 @@ import utils from 'matrix-js-sdk/lib/utils'; import EventTimeline from 'matrix-js-sdk/lib/models/event-timeline'; import EventTimelineSet from 'matrix-js-sdk/lib/models/event-timeline-set'; import createMatrixClient from './utils/createMatrixClient'; +import SettingsStore from './settings/SettingsStore'; interface MatrixClientCreds { homeserverUrl: string, @@ -144,6 +145,7 @@ class MatrixClientPeg { userId: creds.userId, deviceId: creds.deviceId, timelineSupport: true, + forceTURN: SettingsStore.getValue('webRtcForceTURN', false), }; this.matrixClient = createMatrixClient(opts, this.indexedDbWorkerScript); diff --git a/src/components/structures/UserSettings.js b/src/components/structures/UserSettings.js index 933f90523a..88619266ce 100644 --- a/src/components/structures/UserSettings.js +++ b/src/components/structures/UserSettings.js @@ -92,7 +92,12 @@ const ANALYTICS_SETTINGS = [ // These settings must be defined in SettingsStore const WEBRTC_SETTINGS = [ - { id: 'webRtcForceTURN' }, + { + id: 'webRtcForceTURN', + fn: (val) => { + MatrixClientPeg.get().setForceTURN(val); + }, + }, ]; // These settings must be defined in SettingsStore