♻️(backend) encapsulate recording key and extension logic as properties

Move logic for calculating recording keys and file extensions into proper
properties on recording objects. Simplifies access to Minio storage keys
and clearly documents expected behavior when saving recordings across the
application.
This commit is contained in:
lebaudantoine
2025-04-11 13:50:30 +02:00
committed by aleb_the_flash
parent d74dd967af
commit 3671f2a0dd
3 changed files with 53 additions and 4 deletions

View File

@@ -112,10 +112,8 @@ class NotificationService:
logger.error("No owner found for recording %s", recording.id)
return False
key = f"{settings.RECORDING_OUTPUT_FOLDER}/{recording.id}.ogg"
payload = {
"filename": key,
"filename": recording.key,
"email": owner_access.user.email,
"sub": owner_access.user.sub,
}