Skip to content
Snippets Groups Projects
Commit a41e3a4d authored by Thomas Hackl's avatar Thomas Hackl
Browse files

getHeaderLine is static; adjust to current db scheme

parent d6b6435d
No related branches found
No related tags found
No related merge requests found
......@@ -73,8 +73,6 @@ class MatrixChatController extends AuthenticatedController
$mapping->user_id = User::findCurrent()->id;
$mapping->matrix_account_id = $username;
$mapping->matrix_password = $password;
$mapping->access_token = $account->getAccessToken();
$mapping->device_id = $account->getDeviceId();
$mapping->store();
PageLayout::postSuccess(dgettext('matrix', 'Ihre Kennung wurde erfolgreich angelegt.'));
......
......@@ -29,7 +29,7 @@ class MatrixClient
public static function get()
{
if (is_null(MatrixClient::$client)) {
MatrixClient::$client = new Patrix\MatrixClient(Config::get()->MATRIX_SERVER_URL);
MatrixClient::$client = new Patrix\MatrixClient(Config::get()->MATRIX_SERVER_HOSTNAME);
}
return MatrixClient::$client;
......
......@@ -42,7 +42,7 @@ class MatrixRoom extends SimpleORMap
{
if (!($room = self::find($context->getId()))) {
$sysaccount = MatrixAccount::requireSystemAccount();
$newRoom = MatrixClient::get()->createRoom($sysaccount, $context->getHeaderLine());
$newRoom = MatrixClient::get()->createRoom($sysaccount, Context::getHeaderLine());
$mapping = new self();
$mapping->range_id = $context->getId();
$mapping->matrix_room_id = $newRoom['room_id'];
......@@ -61,7 +61,7 @@ class MatrixRoom extends SimpleORMap
public function getRoom()
{
$context = Context::loadContext($this->range_id);
return new Patrix\Room($this->matrix_room_id, $context->getHeaderLine());
return new Patrix\Room($this->matrix_room_id, Context::getHeaderLine());
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment