Fix a bug in the url. Might cause problems later

This commit is contained in:
Dusty Pianalto 2019-10-21 01:04:11 -08:00
parent 05b2659765
commit 3b5a1b460f

View File

@ -48,7 +48,7 @@ class API:
path = f'{MATRIX_MEDIA if request_type == "MEDIA" else MATRIX_API}/{endpoint}' path = f'{MATRIX_MEDIA if request_type == "MEDIA" else MATRIX_API}/{endpoint}'
path = self.base_url + quote(path) path = self.base_url + quote(path)
if query: if query:
path += f"?{urlencode(query)}" path += f"?{urlencode(query).lower()}"
return path return path
def get_wait_time(self, num_timeouts: int) -> float: def get_wait_time(self, num_timeouts: int) -> float:
@ -197,6 +197,7 @@ class API:
query["since"] = since query["since"] = since
path = self.build_url("sync", query=query) path = self.build_url("sync", query=query)
print(path)
resp = await self.send("GET", path) resp = await self.send("GET", path)
return resp return resp