From eac41d01e62786ee8086e2b5d9bd426636e40107 Mon Sep 17 00:00:00 2001 From: alemi Date: Mon, 29 Jan 2024 18:57:15 +0100 Subject: [PATCH] fix: use base url to compose URLs --- src/aioappsrv/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/aioappsrv/app.py b/src/aioappsrv/app.py index a90ecad..59f5097 100644 --- a/src/aioappsrv/app.py +++ b/src/aioappsrv/app.py @@ -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",