Porting room
This commit is contained in:
parent
e97027f4c5
commit
889c16363d
4 changed files with 904 additions and 9 deletions
|
|
@ -93,7 +93,7 @@ class MatrixClient {
|
|||
* A `User` object in this array is shared between all `Room`
|
||||
* objects where the corresponding user is joined.
|
||||
*/
|
||||
protected $users = [];
|
||||
public $users = [];
|
||||
protected $userId;
|
||||
protected $token;
|
||||
protected $hs;
|
||||
|
|
@ -423,7 +423,7 @@ class MatrixClient {
|
|||
try {
|
||||
$event = $this->api->getStateEvent($roomId, "m.room.encryption");
|
||||
if ($event['algorithm'] === "m.megolm.v1.aes-sha2") {
|
||||
$room->setEncrytion(true);
|
||||
$room->enableEncryption();
|
||||
}
|
||||
} catch (MatrixRequestException $e) {
|
||||
if ($e->getHttpCode() != 404) {
|
||||
|
|
@ -528,4 +528,16 @@ class MatrixClient {
|
|||
return true;
|
||||
}
|
||||
|
||||
public function api(): MatrixHttpApi {
|
||||
return $this->api;
|
||||
}
|
||||
|
||||
public function userId():?string {
|
||||
return $this->userId;
|
||||
}
|
||||
|
||||
public function cacheLevel() {
|
||||
return $this->cacheLevel;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue