mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-01 08:46:03 -04:00
rename endpoint to better reflect what it is and allow specifying multiple uris
This commit is contained in:
parent
b42b0d3fe5
commit
5383ba5587
2 changed files with 6 additions and 8 deletions
|
@ -24,13 +24,13 @@ import base64
|
|||
|
||||
|
||||
class VoipRestServlet(RestServlet):
|
||||
PATTERN = client_path_pattern("/voip/turnuris$")
|
||||
PATTERN = client_path_pattern("/voip/turnServers$")
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def on_GET(self, request):
|
||||
auth_user = yield self.auth.get_user_by_req(request)
|
||||
|
||||
turnUri = self.hs.config.turn_uri
|
||||
turnUris = self.hs.config.turn_uris
|
||||
turnSecret = self.hs.config.turn_shared_secret
|
||||
userLifetime = self.hs.config.turn_user_lifetime
|
||||
if not turnUri or not turnSecret or not userLifetime:
|
||||
|
@ -49,9 +49,7 @@ class VoipRestServlet(RestServlet):
|
|||
'username': username,
|
||||
'password': password,
|
||||
'ttl': userLifetime / 1000,
|
||||
'uris': [
|
||||
turnUri,
|
||||
]
|
||||
'uris': turnUris,
|
||||
}) )
|
||||
|
||||
def on_OPTIONS(self, request):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue