Adds a workaround to login on servers without .well_known
This commit is contained in:
@@ -156,7 +156,10 @@ void Login::login()
|
||||
m_isLoggingIn = true;
|
||||
Q_EMIT isLoggingInChanged();
|
||||
|
||||
m_connection->loginWithPassword(m_matrixId, m_password, m_deviceName, QString());
|
||||
// Some servers do not have a .well_known file. So we login via the username part from the mxid,
|
||||
// rather than with the full mxid, as that would lead to an invalid user.
|
||||
QStringRef username(&m_matrixId, 1, m_matrixId.indexOf(":") - 1);
|
||||
m_connection->loginWithPassword(username.toString(), m_password, m_deviceName, QString());
|
||||
}
|
||||
|
||||
bool Login::supportsPassword() const
|
||||
|
||||
@@ -29,7 +29,7 @@ LoginStep {
|
||||
Kirigami.FormData.label: i18n("Matrix ID:")
|
||||
placeholderText: "@user:matrix.org"
|
||||
onTextChanged: {
|
||||
if(acceptableInput) {
|
||||
if (acceptableInput) {
|
||||
LoginHelper.matrixId = text
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user