Skip to content
Snippets Groups Projects
Unverified Commit 145cb6d0 authored by Lukas Lihotzki's avatar Lukas Lihotzki Committed by GitHub
Browse files

Fix getTurnServer response: return an integer ttl (#10922)

`ttl` must be an integer according to the OpenAPI spec:
https://github.com/matrix-org/matrix-doc/blob/old_master/data/api/client-server/voip.yaml#L70



True division (`/`) returns a float instead (`"ttl": 7200.0`).
Floor division (`//`) returns an integer, so the response is spec compliant.

Signed-off-by: default avatarLukas Lihotzki <lukas@lihotzki.de>
parent 29364145
No related branches found
No related tags found
No related merge requests found
Fix a minor bug in the response to `/_matrix/client/r0/voip/turnServer`. Contributed by @lukaslihotzki.
......@@ -70,7 +70,7 @@ class VoipRestServlet(RestServlet):
{
"username": username,
"password": password,
"ttl": userLifetime / 1000,
"ttl": userLifetime // 1000,
"uris": turnUris,
},
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment