From 8c300b3e2514aed51db4e3daa2fbbb8acbdc4b1b Mon Sep 17 00:00:00 2001 From: Yoann Celton Date: Sat, 8 Dec 2018 18:05:39 +1100 Subject: [PATCH] Fixing couple issues on the Room --- src/Room.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Room.php b/src/Room.php index 409abb9..5b36cc1 100644 --- a/src/Room.php +++ b/src/Room.php @@ -124,7 +124,7 @@ class Room { * @throws Exceptions\MatrixRequestException */ public function sendText(string $text) { - return $this->api()->sendMessageEvent($this->roomId, $text); + return $this->api()->sendMessage($this->roomId, $text); } public function getHtmlContent(string $html, ?string $body = null, string $msgType = 'm.text') { @@ -395,7 +395,7 @@ class Room { ]; } - protected function putEvent(array $event) { + public function putEvent(array $event) { $this->events[] = $event; if (count($this->events) > $this->eventHistoryLimit) { array_pop($this->events); @@ -411,7 +411,7 @@ class Room { } } - protected function putEphemeralEvent(array $event) { + public function putEphemeralEvent(array $event) { // Dispatch for room-specific listeners foreach ($this->ephemeralListeners as $l) { if (!$l['event_type'] || $l['event_type'] == $event['event_type']) { @@ -830,7 +830,7 @@ class Room { return true; } - protected function processStateEvent(array $stateEvent) { + public function processStateEvent(array $stateEvent) { if (!array_key_exists('type', $stateEvent)) { return; }