mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
matrixsynapse: Update old STUN URIs to remove 'transport' parameter
- If the STUN/TURN configuration is not managed by FreedomBox, the parameters are left unchanged. Tests: - Install app after installing Coturn. Notice that STUN URI doesn't have a 'transport' parameter. - Install app without the patches after installing Coturn. Notice that STUN URIs have 'transport' parameter. Then apply patches. Setup is run. 'transport' parameter is removed and only one STUN URI is present. matrix-synapse server restarts successfully and don't have show any errors/warnings regarding STUN/TURN configuration during startup. - Install app without patches and set custom STUN/TURN URIs. Apply patches. Setup is run. The URIs are not changed. Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
e6e6896d0d
commit
e42740b589
@ -44,7 +44,7 @@ class MatrixSynapseApp(app_module.App):
|
||||
|
||||
app_id = 'matrixsynapse'
|
||||
|
||||
_version = 9
|
||||
_version = 10
|
||||
|
||||
def __init__(self):
|
||||
"""Create components for the app."""
|
||||
@ -129,9 +129,14 @@ class MatrixSynapseApp(app_module.App):
|
||||
|
||||
self.get_component('letsencrypt-matrixsynapse').setup_certificates()
|
||||
|
||||
# Configure STUN/TURN only if there's a valid TLS domain set for Coturn
|
||||
config = self.get_component('turn-matrixsynapse').get_configuration()
|
||||
update_turn_configuration(config, force=True)
|
||||
if not old_version or get_turn_configuration()[1]:
|
||||
# Configure STUN/TURN only if there's a valid TLS domain set for
|
||||
# Coturn. Do this if app is being freshly installed or if it is
|
||||
# previously installed and configured to use STUN/TURN
|
||||
# auto-management.
|
||||
config = self.get_component(
|
||||
'turn-matrixsynapse').get_configuration()
|
||||
update_turn_configuration(config, force=True)
|
||||
|
||||
def uninstall(self):
|
||||
"""De-configure and uninstall the app."""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user