From 72b9c0c443e0e70c940602b3ea23f1969e67a776 Mon Sep 17 00:00:00 2001
From: Thomas Hackl <hackl@data-quest.de>
Date: Wed, 4 May 2022 12:06:36 +0200
Subject: [PATCH] one should use correct config entry name...

---
 models/MatrixAccount.php | 6 +++---
 plugin.manifest          | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/models/MatrixAccount.php b/models/MatrixAccount.php
index 7575dd5..2d96725 100644
--- a/models/MatrixAccount.php
+++ b/models/MatrixAccount.php
@@ -58,12 +58,12 @@ class MatrixAccount extends SimpleORMap
     {
         if (trim(Config::get()->MATRIX_SYSTEM_ACCOUNT_USERNAME) != '' &&
                 (trim(Config::get()->MATRIX_SYSTEM_ACCOUNT_PASSWORD) != '' ||
-                    trim(Config::get()->MATRIX_SYSTEM_ACCOUNT_TOKEN) != '')) {
+                    trim(Config::get()->MATRIX_SYSTEM_ACCOUNT_LOGIN_TOKEN) != '')) {
 
             // Login token specified, use this.
-            if (trim(Config::get()->MATRIX_SYSTEM_ACCOUNT_TOKEN) != '') {
+            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_TOKEN));
+                    trim(Config::get()->MATRIX_SYSTEM_ACCOUNT_LOGIN_TOKEN));
             // No token, login by username and password.
             } else {
                 $account = new Patrix\Account(trim(Config::get()->MATRIX_SYSTEM_ACCOUNT_USERNAME),
diff --git a/plugin.manifest b/plugin.manifest
index 82b8eb1..32c43c0 100644
--- a/plugin.manifest
+++ b/plugin.manifest
@@ -1,7 +1,7 @@
 pluginname=Matrix-Chat
 pluginclassname=MatrixPlugin
 origin=data-quest
-version=1.1.q
+version=1.1.1
 screenshot=assets/images/matrix_logo.png
 description=Matrix chat for Stud.IP courses
 studipMinVersion=4.5
-- 
GitLab