Check for any errors leaving the room, not just the top level
This commit is contained in:
parent
a34a8bb425
commit
4fd48988e9
1 changed files with 5 additions and 4 deletions
|
@ -1067,10 +1067,11 @@ export default React.createClass({
|
||||||
d.then((errors) => {
|
d.then((errors) => {
|
||||||
modal.close();
|
modal.close();
|
||||||
|
|
||||||
if (errors[roomId]) {
|
for (const leftRoomId of Object.keys(errors)) {
|
||||||
// Something went wrong
|
const err = errors[leftRoomId];
|
||||||
const err = errors[roomId];
|
if (!err) continue;
|
||||||
console.error("Failed to leave room " + roomId + " " + err);
|
|
||||||
|
console.error("Failed to leave room " + leftRoomId + " " + err);
|
||||||
let title = _t("Failed to leave room");
|
let title = _t("Failed to leave room");
|
||||||
let message = _t("Server may be unavailable, overloaded, or you hit a bug.");
|
let message = _t("Server may be unavailable, overloaded, or you hit a bug.");
|
||||||
if (err.errcode === 'M_CANNOT_LEAVE_SERVER_NOTICE_ROOM') {
|
if (err.errcode === 'M_CANNOT_LEAVE_SERVER_NOTICE_ROOM') {
|
||||||
|
|
Loading…
Reference in a new issue