diff --git a/models/MatrixAccount.php b/models/MatrixAccount.php index 2d967259c120134091bc46bad1f668430cbaa5ca..452399bf830e1905119a0fd2d874bca899157b71 100644 --- a/models/MatrixAccount.php +++ b/models/MatrixAccount.php @@ -64,12 +64,14 @@ class MatrixAccount extends SimpleORMap if (trim(Config::get()->MATRIX_SYSTEM_ACCOUNT_LOGIN_TOKEN) != '') { $account = new Patrix\Account(trim(Config::get()->MATRIX_SYSTEM_ACCOUNT_USERNAME), '', trim(Config::get()->MATRIX_SYSTEM_ACCOUNT_LOGIN_TOKEN)); + $viaToken = true; // No token, login by username and password. } else { $account = new Patrix\Account(trim(Config::get()->MATRIX_SYSTEM_ACCOUNT_USERNAME), trim(Config::get()->MATRIX_SYSTEM_ACCOUNT_PASSWORD)); + $viaToken = false; } - MatrixClient::get()->login($account); + MatrixClient::get()->login($account, $viaToken); return $account; } else { diff --git a/plugin.manifest b/plugin.manifest index 32c43c02e1fc561ab524c222d30dec3b9a5cf8e5..10153f99aafec5695d4b3482962cf28eda485d30 100644 --- a/plugin.manifest +++ b/plugin.manifest @@ -1,7 +1,7 @@ pluginname=Matrix-Chat pluginclassname=MatrixPlugin origin=data-quest -version=1.1.1 +version=1.1.2 screenshot=assets/images/matrix_logo.png description=Matrix chat for Stud.IP courses studipMinVersion=4.5