mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-14 22:11:47 +01:00
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: Lukas Lihotzki <lukas@lihotzki.de>
This commit is contained in:
parent
29364145b2
commit
145cb6d08e
2 changed files with 2 additions and 1 deletions
1
changelog.d/10922.bugfix
Normal file
1
changelog.d/10922.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
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,
|
||||
},
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue