def update_turn_configuration(config: TurnConfiguration, managed=True, force=False): """Update the STUN/TURN server configuration.""" if not force and app.needs_setup(): return params = ['configure-turn'] params += ['--managed'] if managed else [] actions.superuser_run('matrixsynapse', params, input=config.to_json().encode())
def update_turn_configuration(config: TurnConfiguration, managed=True, force=False): """Update the STUN/TURN server configuration.""" setup_helper = globals()['setup_helper'] if not force and setup_helper.get_state() == 'needs-setup': return params = ['configure-turn'] params += ['--managed'] if managed else [] actions.superuser_run('matrixsynapse', params, input=config.to_json().encode())