mirror of https://github.com/vector-im/riot-web
give proper error message on failing to start chat
parent
1abd7f45ce
commit
7c598d90b1
|
@ -211,6 +211,7 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
onChatClick: function() {
|
onChatClick: function() {
|
||||||
|
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||||
// check if there are any existing rooms with just us and them (1:1)
|
// check if there are any existing rooms with just us and them (1:1)
|
||||||
// If so, just view that room. If not, create a private room with them.
|
// If so, just view that room. If not, create a private room with them.
|
||||||
var self = this;
|
var self = this;
|
||||||
|
@ -259,9 +260,10 @@ module.exports = React.createClass({
|
||||||
self.props.onFinished();
|
self.props.onFinished();
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
self.setState({ creatingRoom: false });
|
self.setState({ creatingRoom: false });
|
||||||
console.error(
|
Modal.createDialog(ErrorDialog, {
|
||||||
"Failed to create room: %s", JSON.stringify(err)
|
title: "Failure to start chat",
|
||||||
);
|
description: err.message
|
||||||
|
});
|
||||||
self.props.onFinished();
|
self.props.onFinished();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue