mirror of https://github.com/Nheko-Reborn/nheko
The current code results in confusing behavior under the following circumstances: - Homeserver is guessed correctly from the Matrix ID - The server returns invalid (e.g. HTTP 200 with empty body) response for .well-known data The user will be presented with "Autodiscovery failed. Received malformed response" message even though all details are entered correctly. Login button will not work. The only workaround is to edit the home server field a few times so that homeserverChanged() and checkHomeserverVersion() would be invoked. This is not optimal, especially because autodiscovery based on .well-known is optional. The solution is to always invoke checkHomeserverVersion() even when autodiscovery fails due to any reason. checkHomeserverVersion() will check the home server against required Matrix API endpoints. If this fails, user will be presented with error messages instructing to check home server URL. Accordingly, allowing to continue in case of failed autodiscovery does not reduce clarity of errors presented to the user.pull/1815/head
parent
25e552c6fa
commit
fb610a3d07
Loading…
Reference in new issue