fix: use base url to compose URLs
This commit is contained in:
parent
5710a71651
commit
eac41d01e6
1 changed files with 2 additions and 2 deletions
|
@ -79,7 +79,7 @@ class AppService:
|
|||
async def join_room(self, room: str, mxid: str | None = None):
|
||||
async with self._client.request(
|
||||
method="POST",
|
||||
url=f"/join/{room}",
|
||||
url=f"{self.base_url}/_matrix/client/r0/join/{room}",
|
||||
headers={
|
||||
"Authorization": f"Bearer {self.as_token}",
|
||||
"Content-Type": "application/json",
|
||||
|
@ -95,7 +95,7 @@ class AppService:
|
|||
async def send_message(self, room: str, text: str, mxid: str | None = None) -> str:
|
||||
async with self._client.request(
|
||||
method="PUT",
|
||||
url=f"/rooms/{room}/send/m.room.message/{uuid.uuid4()}",
|
||||
url=f"{self.base_url}/_matrix/client/r0/rooms/{room}/send/m.room.message/{uuid.uuid4()}",
|
||||
headers={
|
||||
"Authorization": f"Bearer {self.as_token}",
|
||||
"Content-Type": "application/json",
|
||||
|
|
Loading…
Reference in a new issue