You've already forked element-web
mirror of
https://github.com/element-hq/element-web.git
synced 2025-11-29 21:23:11 +03:00
Show an ErrorDialog when failing to forget a room
This commit is contained in:
@@ -871,7 +871,12 @@ module.exports = React.createClass({
|
|||||||
MatrixClientPeg.get().forget(this.props.roomId).done(function() {
|
MatrixClientPeg.get().forget(this.props.roomId).done(function() {
|
||||||
dis.dispatch({ action: 'view_next_room' });
|
dis.dispatch({ action: 'view_next_room' });
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
console.error("Failed to forget room: %s", err);
|
var errCode = err.errcode || "unknown error code";
|
||||||
|
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||||
|
Modal.createDialog(ErrorDialog, {
|
||||||
|
title: "Error",
|
||||||
|
description: `Failed to forget room (${errCode})`
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user