diff --git a/recording/src/nextcloud/talk/recording/BackendNotifier.py b/recording/src/nextcloud/talk/recording/BackendNotifier.py index 84844655bf7..294e3fc6344 100644 --- a/recording/src/nextcloud/talk/recording/BackendNotifier.py +++ b/recording/src/nextcloud/talk/recording/BackendNotifier.py @@ -99,7 +99,7 @@ def backendRequest(backend, data): 'OCS-ApiRequest': 'true', 'Talk-Recording-Random': random, 'Talk-Recording-Checksum': checksum, - 'User-Agent': f'Mozilla/5.0 (Recording) Nextcloud-Talk v{recording.__version__}', + 'User-Agent': recording.USER_AGENT, } backendRequest = Request(url, data, headers) @@ -188,7 +188,7 @@ def uploadRecording(backend, token, fileName, owner): logger.info(f"Upload recording {fileName} to {backend} in {token} as {owner}") - url = backend + '/ocs/v2.php/apps/spreed/api/v1/recording/' + token + '/store' + url = backend.rstrip('/') + '/ocs/v2.php/apps/spreed/api/v1/recording/' + token + '/store' fileContents = None with open(fileName, 'rb') as file: @@ -209,6 +209,7 @@ def uploadRecording(backend, token, fileName, owner): 'OCS-ApiRequest': 'true', 'Talk-Recording-Random': random, 'Talk-Recording-Checksum': checksum, + 'User-Agent': recording.USER_AGENT, } uploadRequest = Request(url, data, headers)