You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-10 09:22:25 +03:00
give proper error message on failing to start chat
This commit is contained in:
@@ -211,6 +211,7 @@ module.exports = React.createClass({
|
||||
},
|
||||
|
||||
onChatClick: function() {
|
||||
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||
// 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.
|
||||
var self = this;
|
||||
@@ -259,9 +260,10 @@ module.exports = React.createClass({
|
||||
self.props.onFinished();
|
||||
}, function(err) {
|
||||
self.setState({ creatingRoom: false });
|
||||
console.error(
|
||||
"Failed to create room: %s", JSON.stringify(err)
|
||||
);
|
||||
Modal.createDialog(ErrorDialog, {
|
||||
title: "Failure to start chat",
|
||||
description: err.message
|
||||
});
|
||||
self.props.onFinished();
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user