Merge remote-tracking branch 'origin/develop' into release-v0.8.1

This commit is contained in:
David Baker 2016-12-06 16:02:14 +00:00
commit 1006d50a0d
6 changed files with 17 additions and 13 deletions

View file

@ -63,7 +63,7 @@ export default class BasePlatform {
requestNotificationPermission() : Promise<string> {
}
displayNotification(title: string, msg: string, avatarUrl: string) {
displayNotification(title: string, msg: string, avatarUrl: string, room: Object) {
}
/**

View file

@ -73,7 +73,7 @@ var Notifier = {
ev.sender, 40, 40, 'crop'
) : null;
const notif = plaf.displayNotification(title, msg, avatarUrl);
const notif = plaf.displayNotification(title, msg, avatarUrl, room);
// if displayNotification returns non-null, the platform supports
// clearing notifications later, so keep track of this.

View file

@ -292,12 +292,15 @@ const onMessage = function(event) {
event.origin = event.originalEvent.origin;
}
// check it is from the integrations UI URL (remove trailing spaces)
// Check that the integrations UI URL starts with the origin of the event
// This means the URL could contain a path (like /develop) and still be used
// to validate event origins, which do not specify paths.
// (See https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage)
//
// All strings start with the empty string, so for sanity return if the length
// of the event origin is 0.
let url = SdkConfig.get().integrations_ui_url;
if (url.endsWith("/")) {
url = url.substr(0, url.length - 1);
}
if (url !== event.origin) {
if (event.origin.length === 0 || !url.startsWith(event.origin)) {
return; // don't log this - debugging APIs like to spam postMessage which floods the log otherwise
}

View file

@ -402,6 +402,9 @@ module.exports = React.createClass({
q.finally(fillPromise, () => {
this._pendingFillRequests[dir] = false;
}).then((hasMoreResults) => {
if (this.unmounted) {
return;
}
// Unpaginate once filling is complete
this._checkUnfillState(!backwards);

View file

@ -338,17 +338,15 @@ module.exports = React.createClass({
},
_renderCryptoInfo: function() {
var client = MatrixClientPeg.get();
var deviceId = client.deviceId;
var identityKey = client.getDeviceEd25519Key() || "<not supported>";
const client = MatrixClientPeg.get();
const deviceId = client.deviceId;
const identityKey = client.getDeviceEd25519Key() || "<not supported>";
var myDevice = client.getStoredDevicesForUser(MatrixClientPeg.get().credentials.userId)[0];
return (
<div>
<h3>Cryptography</h3>
<div className="mx_UserSettings_section mx_UserSettings_cryptoSection">
<ul>
<li><label>Device name:</label> <span>{ myDevice.getDisplayName() }</span></li>
<li><label>Device ID:</label> <span><code>{deviceId}</code></span></li>
<li><label>Device key:</label> <span><code><b>{identityKey}</b></code></span></li>
</ul>

View file

@ -89,7 +89,7 @@ export default class DirectorySearchBox extends React.Component {
return <span className={classnames(searchbox_classes)}>
<div className="mx_DirectorySearchBox_container">
<input type="text" value={this.state.value}
<input type="text" name="dirsearch" value={this.state.value}
className="mx_DirectorySearchBox_input"
ref={this._collectInput}
onChange={this._onChange} onKeyUp={this._onKeyUp}