{
+ dis.dispatch({action: 'message_sent'});
+ }, (err) => {
+ if (err.name === "UnknownDeviceError") {
+ dis.dispatch({
+ action: 'unknown_device_error',
+ err: err,
+ room: Client.getRoom(payload.room_id),
+ });
+ }
+ dis.dispatch({action: 'message_send_failed'});
+ });
+ if (this.props.currentRoomId === payload.room_id) this.props.onCancelClick();
+ }
+ },
+
+ _onKeyDown: function(ev) {
+ switch (ev.keyCode) {
+ case KeyCode.ESCAPE:
+ this.props.onCancelClick();
+ break;
+ }
+ },
+
+ render: function() {
+ return (
+
+
Please select the destination room for this message
+
+ );
+ },
+});
diff --git a/src/components/views/rooms/RoomHeader.js b/src/components/views/rooms/RoomHeader.js
index 3463ef948f..0ef69daba3 100644
--- a/src/components/views/rooms/RoomHeader.js
+++ b/src/components/views/rooms/RoomHeader.js
@@ -189,6 +189,9 @@ module.exports = React.createClass({
);
save_button = Save;
+ }
+
+ if (this.props.onCancelClick) {
cancel_button = ;
}
diff --git a/src/dispatcher.js b/src/dispatcher.js
index 9864cb3807..f3ebed8357 100644
--- a/src/dispatcher.js
+++ b/src/dispatcher.js
@@ -16,13 +16,13 @@ limitations under the License.
'use strict';
-var flux = require("flux");
+const flux = require("flux");
class MatrixDispatcher extends flux.Dispatcher {
/**
* @param {Object} payload Required. The payload to dispatch.
* Must contain at least an 'action' key.
- * @param {boolean} sync Optional. Pass true to dispatch
+ * @param {boolean=} sync Optional. Pass true to dispatch
* synchronously. This is useful for anything triggering
* an operation that the browser requires user interaction
* for.
diff --git a/src/i18n/strings/fr.json b/src/i18n/strings/fr.json
index e10c606233..53d24d484b 100644
--- a/src/i18n/strings/fr.json
+++ b/src/i18n/strings/fr.json
@@ -270,7 +270,7 @@
"Failed to reject invitation": "Échec lors du rejet de l'invitation",
"Failed to save settings": "Échec lors de la sauvegarde des paramètres",
"Failed to send email": "Échec lors de l’envoi de l’e-mail",
- "Failed to send request": "Échec lors de l’envoi de la requête",
+ "Failed to send request.": "Échec lors de l’envoi de la requête.",
"Failed to set display name": "Échec lors de l'enregistrement du nom d'affichage",
"Failed to set up conference call": "Échec lors de l’établissement de l’appel",
"Failed to toggle moderator status": "Échec lors de l’établissement du statut de modérateur",
diff --git a/src/i18n/strings/ru.json b/src/i18n/strings/ru.json
index 5b81b88a92..cdebc47160 100644
--- a/src/i18n/strings/ru.json
+++ b/src/i18n/strings/ru.json
@@ -449,7 +449,7 @@
"sx": "Суту",
"zh-hk": "Китайский (Гонконг)",
"A text message has been sent to +%(msisdn)s. Please enter the verification code it contains": "На +%(msisdn)s было отправлено текстовое сообщение. Пожалуйста, введите проверочный код из него",
- "and %(overflowCount)s others...": "и %(overflowCounts)s других...",
+ "and %(overflowCount)s others...": "и %(overflowCount)s других...",
"Are you sure?": "Вы уверены?",
"Autoplay GIFs and videos": "Проигрывать GIF и видео автоматически",
"Can't connect to homeserver - please check your connectivity and ensure your %(urlStart)s homeserver's SSL certificate %(urlEnd)s is trusted": "Невозможно соединиться с домашним сервером - проверьте своё соединение и убедитесь, что %(urlStart)s SSL-сертификат вашего домашнего сервера %(urlEnd)s включён в доверяемые",