From eb2c98f67fbbb7458640025549694b3a27090f55 Mon Sep 17 00:00:00 2001 From: miruka Date: Tue, 2 Jun 2020 20:19:09 -0400 Subject: [PATCH] Handle MatrixNotFound errors, not UserNotFound UserNotFound doesn't exist anymore --- CHANGELOG.md | 3 +++ TODO.md | 1 - src/gui/Pages/AddChat/DirectChat.qml | 2 +- src/gui/Popups/InviteToRoomPopup.qml | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe21addb..70db97c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,6 +53,9 @@ and this project adheres to - Fix Python pickling error when trying to redecrypt events after importing E2E keys ([#50](https://github.com/mirukana/mirage/issues/50)) +- Fix the error message shown when trying to start a direct chat with or + invite a non-existing user + - Handle Matrix 502 errors returned when trying to invite a user with an incorrect or unresponsive server in their ID diff --git a/TODO.md b/TODO.md index 7ee19027..e8c03e72 100644 --- a/TODO.md +++ b/TODO.md @@ -2,7 +2,6 @@ - fix cursor over field - update room highlight when creating new room -- unknownerror matrixnotfound when creatign directchat - keyerror when forgetting room while loading members - account order, and verify not adding to config fiel works - Refetch profile after manual profile change, don't wait for a room event diff --git a/src/gui/Pages/AddChat/DirectChat.qml b/src/gui/Pages/AddChat/DirectChat.qml index 078fe3cc..580a13b4 100644 --- a/src/gui/Pages/AddChat/DirectChat.qml +++ b/src/gui/Pages/AddChat/DirectChat.qml @@ -44,7 +44,7 @@ HBox { txt = qsTr("Invalid user ID, expected format is " + "@username:homeserver") - if (type === "UserNotFound") + if (type === "MatrixNotFound") txt = qsTr("This user does not exist") errorMessage.text = txt diff --git a/src/gui/Popups/InviteToRoomPopup.qml b/src/gui/Popups/InviteToRoomPopup.qml index ff3b4474..639159d5 100644 --- a/src/gui/Popups/InviteToRoomPopup.qml +++ b/src/gui/Popups/InviteToRoomPopup.qml @@ -104,7 +104,7 @@ BoxPopup { qsTr("This room rejects users from other matrix " + "servers, can't invite %1").arg(user) : - type === "UserNotFound" ? + type === "MatrixNotFound" ? qsTr("%1 not found, please verify the entered user ID") .arg(user) :