Lines Matching refs:roomId
273 * @param string $roomId The room ID to send the state event in.
281 public function sendStateEvent(string $roomId, string $eventType, array $content, argument
283 $path = sprintf("/rooms/%s/state/%s", urlencode($roomId), urlencode($eventType));
298 * @param string $roomId The room ID.
304 public function getStateEvent(string $roomId, string $eventType) { argument
305 $path = sprintf('/rooms/%s/state/%s', urlencode($roomId), urlencode($eventType));
311 * @param string $roomId The room ID to send the message event in.
321 public function sendMessageEvent(string $roomId, string $eventType, array $content, argument
326 …$path = sprintf('/rooms/%s/send/%s/%s', urlencode($roomId), urlencode($eventType), urlencode($txnI…
338 * @param string $roomId The room ID to redact the message event in.
348 public function redactEvent(string $roomId, string $eventId, ?string $reason = null, argument
353 …$path = sprintf('/rooms/%s/redact/%s/%s', urlencode($roomId), urlencode($eventId), urlencode($txnI…
371 * @param string $roomId
382 public function sendContent(string $roomId, string $itemUrl, string $itemName, string $msgType, argument
391 return $this->sendMessageEvent($roomId, 'm.room.message', $contentPack, null, $timestamp);
399 * @param string $roomId The room ID to send the event in.
410 …public function sendLocation(string $roomId, string $geoUri, string $name, string $thumbUrl = null, argument
424 return $this->sendMessageEvent($roomId, 'm.room.message', $contentPack, null, $timestamp);
430 * @param string $roomId The room ID to send the event in.
439 …public function sendMessage(string $roomId, string $textContent, string $msgType = 'm.text', int $… argument
442 return $this->sendMessageEvent($roomId, 'm.room.message', $textBody, null, $timestamp);
448 * @param string $roomId The room ID to send the event in.
456 public function sendEmote(string $roomId, string $textContent, int $timestamp = null) { argument
459 return $this->sendMessageEvent($roomId, 'm.room.message', $body, null, $timestamp);
465 * @param string $roomId The room ID to send the event in.
473 public function sendNotice(string $roomId, string $textContent, int $timestamp = null) { argument
479 return $this->sendMessageEvent($roomId, 'm.room.message', $body, null, $timestamp);
483 * @param string $roomId The room's id.
493 …public function getRoomMessages(string $roomId, string $token, string $direction, int $limit = 10,… argument
495 "roomId" => $roomId,
504 $path = sprintf('/rooms/%s/messages', urlencode($roomId));
512 * @param string $roomId The room ID
517 public function getRoomName(string $roomId) { argument
518 return $this->getStateEvent($roomId, 'm.room.name');
524 * @param string $roomId The room ID
530 public function setRoomName(string $roomId, string $name, int $timestamp = null) { argument
533 return $this->sendStateEvent($roomId, 'm.room.name', $body, '', $timestamp);
539 * @param string $roomId The room ID
544 public function getRoomTopic(string $roomId) { argument
545 return $this->getStateEvent($roomId, 'm.room.topic');
551 * @param string $roomId The room ID
557 public function setRoomTopic(string $roomId, string $topic, int $timestamp = null) { argument
560 return $this->sendStateEvent($roomId, 'm.room.topic', $body, '', $timestamp);
568 * @param string $roomId The room ID
573 public function getPowerLevels(string $roomId) { argument
574 return $this->getStateEvent($roomId, 'm.room.power_levels');
605 * @param string $roomId
610 public function setPowerLevels(string $roomId, array $content) { argument
617 return $this->sendStateEvent($roomId, 'm.room.power_levels', $content);
623 * @param string $roomId The room ID
629 public function leaveRoom(string $roomId) { argument
630 return $this->send('POST', sprintf('/rooms/%s/leave', urlencode($roomId)));
636 * @param string $roomId The room ID
642 public function forgetRoom(string $roomId) { argument
643 return $this->send('POST', sprintf('/rooms/%s/forget', urlencode($roomId)), []);
649 * @param string $roomId The room ID
656 public function inviteUser(string $roomId, string $userId) { argument
659 return $this->send('POST', sprintf('/rooms/%s/invite', urlencode($roomId)), $body);
665 * @param string $roomId The room ID
671 public function kickUser(string $roomId, string $userId, string $reason = '') { argument
672 return $this->setMembership($roomId, $userId, 'leave', $reason);
678 * @param string $roomId The room ID
685 public function getMembership(string $roomId, string $userId) { argument
686 $path = sprintf('/rooms/%s/state/m.room.member/%s', urlencode($roomId), urlencode($userId));
694 * @param string $roomId The room ID
703 …public function setMembership(string $roomId, string $userId, string $membership, string $reason =… argument
715 return $this->sendStateEvent($roomId, 'm.room.member', $body, $userId, $timestamp);
721 * @param string $roomId The room ID
729 public function banUser(string $roomId, string $userId, string $reason = '') { argument
735 return $this->send('POST', sprintf('/rooms/%s/ban', urlencode($roomId)), $body);
741 * @param string $roomId The room ID
748 public function unbanUser(string $roomId, string $userId) { argument
753 return $this->send('POST', sprintf('/rooms/%s/unban', urlencode($roomId)), $body);
758 * @param string $roomId
764 public function getUserTags(string $userId, string $roomId) { argument
765 $path = sprintf('/user/%s/rooms/%s/tags', urlencode($userId), urlencode($roomId));
772 * @param string $roomId
779 public function removeUserTag(string $userId, string $roomId, string $tag) { argument
780 …$path = sprintf('/user/%s/rooms/%s/tags/%s', urlencode($userId), urlencode($roomId), urlencode($ta…
787 * @param string $roomId
796 …public function addUserTag(string $userId, string $roomId, string $tag, ?float $order = null, arra… argument
800 …$path = sprintf('/user/%s/rooms/%s/tags/%s', urlencode($userId), urlencode($roomId), urlencode($ta…
822 * @param string $roomId
830 …public function setRoomAccountData(string $userId, string $roomId, string $type, array $accountDat… argument
833 urlencode($userId), urlencode($roomId), urlencode($type)
842 * @param string $roomId The room ID
848 public function getRoomState(string $roomId) { argument
849 return $this->send('GET', sprintf('/rooms/%s/state', urlencode($roomId)));
1168 * @param string $roomId The room id.
1175 public function setRoomAlias(string $roomId, string $roomAlias) { argument
1176 $content = ['room_id' => $roomId];
1197 * @param string $roomId The room to get the member events for.
1203 public function getRoomMembers(string $roomId) { argument
1204 return $this->send('GET', sprintf("/rooms/%s/members", urlencode($roomId)));
1210 * @param string $roomId The room to set the rules for.
1215 public function setJoinRule(string $roomId, string $joinRule) { argument
1218 return $this->sendStateEvent($roomId, 'm.room.join_rule', $content);
1224 * @param string $roomId The room to set the rules for.
1229 public function setGuestAccess(string $roomId, string $guestAccess) { argument
1232 return $this->sendStateEvent($roomId, 'm.room.guest_access', $content);