0
0
Fork 0
mirror of https://github.com/healthchecks/healthchecks.git synced 2025-04-08 06:30:05 +00:00

Clean up transports.Matrix.get_url()

This commit is contained in:
Pēteris Caune 2024-12-16 15:24:16 +02:00
parent 645efa5ce4
commit f41e1e52ea
No known key found for this signature in database
GPG key ID: E28D7679E9A9EDE2

View file

@ -838,11 +838,11 @@ class VictorOps(HttpTransport):
class Matrix(HttpTransport):
def get_url(self) -> str:
s = quote(self.channel.value)
room_id = quote(self.channel.value)
assert isinstance(settings.MATRIX_HOMESERVER, str)
url = settings.MATRIX_HOMESERVER
url += "/_matrix/client/r0/rooms/%s/send/m.room.message?" % s
url += f"/_matrix/client/r0/rooms/{room_id}/send/m.room.message?"
url += urlencode({"access_token": settings.MATRIX_ACCESS_TOKEN})
return url