Merge remote-tracking branch 'origin/develop' into dbkr/udd_no_auto_show

This commit is contained in:
David Baker 2017-11-20 10:00:47 +00:00
commit e2f5e16fa7
7 changed files with 21 additions and 10 deletions

View file

@ -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) 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) [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.11.0-rc.3...v0.11.0)

View file

@ -1,6 +1,6 @@
{ {
"name": "matrix-react-sdk", "name": "matrix-react-sdk",
"version": "0.11.0", "version": "0.11.1",
"description": "SDK for matrix.org using React", "description": "SDK for matrix.org using React",
"author": "matrix.org", "author": "matrix.org",
"repository": { "repository": {
@ -71,7 +71,7 @@
"isomorphic-fetch": "^2.2.1", "isomorphic-fetch": "^2.2.1",
"linkifyjs": "^2.1.3", "linkifyjs": "^2.1.3",
"lodash": "^4.13.1", "lodash": "^4.13.1",
"matrix-js-sdk": "0.9.0", "matrix-js-sdk": "0.9.1",
"optimist": "^0.6.1", "optimist": "^0.6.1",
"prop-types": "^15.5.8", "prop-types": "^15.5.8",
"querystring": "^0.2.0", "querystring": "^0.2.0",

View file

@ -59,7 +59,6 @@ import sdk from './index';
import { _t } from './languageHandler'; import { _t } from './languageHandler';
import Matrix from 'matrix-js-sdk'; import Matrix from 'matrix-js-sdk';
import dis from './dispatcher'; import dis from './dispatcher';
import SettingsStore from "./settings/SettingsStore";
import { showUnknownDeviceDialogForCalls } from './cryptodevices'; import { showUnknownDeviceDialogForCalls } from './cryptodevices';
global.mxCalls = { global.mxCalls = {
@ -281,9 +280,7 @@ function _onAction(payload) {
return; return;
} else if (members.length === 2) { } else if (members.length === 2) {
console.log("Place %s call in %s", payload.type, payload.room_id); console.log("Place %s call in %s", payload.type, payload.room_id);
const call = Matrix.createNewMatrixCall(MatrixClientPeg.get(), payload.room_id, { const call = Matrix.createNewMatrixCall(MatrixClientPeg.get(), payload.room_id);
forceTURN: SettingsStore.getValue('webRtcForceTURN'),
});
placeCall(call); placeCall(call);
} else { // > 2 } else { // > 2
dis.dispatch({ dis.dispatch({

View file

@ -21,6 +21,7 @@ import utils from 'matrix-js-sdk/lib/utils';
import EventTimeline from 'matrix-js-sdk/lib/models/event-timeline'; import EventTimeline from 'matrix-js-sdk/lib/models/event-timeline';
import EventTimelineSet from 'matrix-js-sdk/lib/models/event-timeline-set'; import EventTimelineSet from 'matrix-js-sdk/lib/models/event-timeline-set';
import createMatrixClient from './utils/createMatrixClient'; import createMatrixClient from './utils/createMatrixClient';
import SettingsStore from './settings/SettingsStore';
interface MatrixClientCreds { interface MatrixClientCreds {
homeserverUrl: string, homeserverUrl: string,
@ -144,6 +145,7 @@ class MatrixClientPeg {
userId: creds.userId, userId: creds.userId,
deviceId: creds.deviceId, deviceId: creds.deviceId,
timelineSupport: true, timelineSupport: true,
forceTURN: SettingsStore.getValue('webRtcForceTURN', false),
}; };
this.matrixClient = createMatrixClient(opts, this.indexedDbWorkerScript); this.matrixClient = createMatrixClient(opts, this.indexedDbWorkerScript);

View file

@ -92,7 +92,12 @@ const ANALYTICS_SETTINGS = [
// These settings must be defined in SettingsStore // These settings must be defined in SettingsStore
const WEBRTC_SETTINGS = [ const WEBRTC_SETTINGS = [
{ id: 'webRtcForceTURN' }, {
id: 'webRtcForceTURN',
fn: (val) => {
MatrixClientPeg.get().setForceTURN(val);
},
},
]; ];
// These settings must be defined in SettingsStore // These settings must be defined in SettingsStore

View file

@ -31,7 +31,7 @@ module.exports = React.createClass({
saveSettings: function() { saveSettings: function() {
const promises = []; const promises = [];
if (this.refs.urlPreviewsRoom) promises.push(this.refs.urlPreviewsRoom.save()); 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; return promises;
}, },
@ -64,7 +64,7 @@ module.exports = React.createClass({
); );
} else { } else {
let str = _td("URL previews are enabled by default for participants in this room."); 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."); str = _td("URL previews are disabled by default for participants in this room.");
} }
previewsForRoom = (<label>{ _t(str) }</label>); previewsForRoom = (<label>{ _t(str) }</label>);

View file

@ -95,7 +95,7 @@ class FlairStore extends EventEmitter {
// Return silently to avoid spamming for non-supporting servers // Return silently to avoid spamming for non-supporting servers
return; 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; throw err;
}).finally(() => { }).finally(() => {
delete this._usersInFlight[userId]; delete this._usersInFlight[userId];