Compare commits

..

3 Commits

Author SHA1 Message Date
lebaudantoine c149c8ce9c 💄(frontend) add minor layout adjustments
Propose minor layout adjustments to ensure the DINUM version with French
copywriting does not look visually awkward due to line breaks.
2026-01-05 17:43:40 +01:00
lebaudantoine 198442b137 🐛(backend) fix certificates volume mount path for Python 3.13
After upgrading Python to 3.13, not all development environments were
updated accordingly. This fixes the incorrect volume mount path
introduced by that upgrade.
2026-01-05 17:43:37 +01:00
lebaudantoine 0fe8d9b681 🐛(backend) fix ignore recording webhook events
Fix an unexpected behavior where filtering LiveKit webhook events sometimes
failed because the room name was not reliably extracted from the webhook data,
causing notifications to be ignored.

Configure the same filtering logic locally to avoid missing this kind of issue
in the future.
2026-01-05 13:34:55 +01:00
10 changed files with 34 additions and 39 deletions
@@ -24,8 +24,6 @@ class RecordingEventsService:
room_name = str(recording.room.id)
print('$$ handle_update')
status_mapping = {
api.EgressStatus.EGRESS_ACTIVE: "started",
api.EgressStatus.EGRESS_ENDING: "saving",
@@ -33,18 +31,12 @@ class RecordingEventsService:
}
recording_status = status_mapping.get(egress_status)
print('$$ recording_status')
print(recording_status)
if recording_status:
try:
print('$$ update')
utils.update_room_metadata(
room_name, {"recording_status": recording_status}
)
except utils.MetadataUpdateException as e:
print('$$ exception')
logger.exception("Failed to update room's metadata: %s", e)
@staticmethod
+4 -15
View File
@@ -118,13 +118,11 @@ class LiveKitEventsService:
except Exception as e:
raise InvalidPayloadError("Invalid webhook payload") from e
if self._filter_regex and not self._filter_regex.search(data.room.name):
logger.info("Filtered webhook event for room '%s'", data.room.name)
return
room_name = data.room.name or data.egress_info.room_name
print('$$ data.event')
print(data.event)
print(data)
if self._filter_regex and not self._filter_regex.search(room_name):
logger.info("Filtered webhook event for room '%s'", room_name)
return
try:
webhook_type = LiveKitWebhookEventType(data.event)
@@ -133,9 +131,6 @@ class LiveKitEventsService:
f"Unknown webhook type: {data.event}"
) from e
print("$$ webhook_type")
print(webhook_type)
handler_name = f"_handle_{webhook_type.value}"
handler = getattr(self, handler_name, None)
@@ -148,8 +143,6 @@ class LiveKitEventsService:
def _handle_egress_updated(self, data):
"""Handle 'egress_updated' event."""
print("$$ _handle_egress_updated")
egress_id = data.egress_info.egress_id
try:
recording = models.Recording.objects.get(worker_id=egress_id)
@@ -158,11 +151,7 @@ class LiveKitEventsService:
f"Recording with worker ID {egress_id} does not exist"
) from err
print("$$ egress found")
egress_status = data.egress_info.status
print('$$ egress_status')
print(egress_status)
self.recording_events.handle_update(recording, egress_status)
def _handle_egress_ended(self, data):
-5
View File
@@ -276,8 +276,6 @@ async def update_room_metadata(
room = response.rooms[0]
existing_metadata = json.loads(room.metadata) if room.metadata else {}
print('$$ existing_metadata')
print(existing_metadata)
if remove_keys:
for key in remove_keys:
@@ -285,9 +283,6 @@ async def update_room_metadata(
updated_metadata = {**existing_metadata, **metadata}
print('$$ updated_metadata')
print(updated_metadata)
await lkapi.room.update_room_metadata(
UpdateRoomMetadataRequest(
room=room_name, metadata=json.dumps(updated_metadata).encode("utf-8")
@@ -66,16 +66,22 @@ export function ToastRecordingRequest({
name: participant?.name,
})}
{!options.isMenuOpen && (
<Button
size="sm"
variant="text"
<div
className={css({
color: 'primary.300',
marginLeft: '0.5rem',
})}
onPress={options.openMenu}
>
{t('openMenu')}
</Button>
<Button
size="sm"
variant="text"
className={css({
color: 'primary.300',
})}
onPress={options.openMenu}
>
{t('openMenu')}
</Button>
</div>
)}
</HStack>
</StyledToastContainer>
@@ -161,6 +161,7 @@ export const ControlsButton = ({
fullWidth
onPress={handle}
isDisabled={isDisabled}
size="compact"
>
{t('button.start')}
</Button>
@@ -29,9 +29,10 @@ export const RowWrapper = ({
className={css({
width: '100%',
background: 'gray.100',
padding: '8px',
paddingBlock: '0.5rem',
paddingInline: '0',
display: 'flex',
marginTop: '4px',
marginTop: '0.25rem',
})}
>
<div
@@ -40,6 +41,7 @@ export const RowWrapper = ({
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
paddingInline: '0.25rem',
})}
>
{/* fixme - doesn't handle properly material-symbols */}
@@ -47,10 +49,11 @@ export const RowWrapper = ({
</div>
<div
className={css({
flex: 5,
flex: 6,
display: 'flex',
alignItems: 'center',
gap: '0.25rem',
paddingInlineEnd: '8px',
})}
>
{children}
@@ -31,6 +31,12 @@ export const buttonRecipe = cva({
borderRadius: 4,
'--square-padding': '0',
},
compact: {
borderRadius: 4,
paddingX: '0.5',
paddingY: '0.625',
'--square-padding': '{spacing.0.625}',
},
},
square: {
true: {
@@ -49,6 +49,7 @@ backend:
{{- end }}
{{- end }}
LIVEKIT_API_URL: https://livekit.127.0.0.1.nip.io/
LIVEKIT_WEBHOOK_EVENTS_FILTER_REGEX: "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
ALLOW_UNREGISTERED_ROOMS: False
FRONTEND_SILENCE_LIVEKIT_DEBUG: False
FRONTEND_SUPPORT: "{'id': '58ea6697-8eba-4492-bc59-ad6562585041', 'help_article_transcript': 'https://lasuite.crisp.help/fr/article/visio-transcript-1sjq43x', 'help_article_recording': 'https://lasuite.crisp.help/fr/article/visio-enregistrement-wgc8o0', 'help_article_more_tools': 'https://lasuite.crisp.help/fr/article/visio-tools-bvxj23'}"
@@ -98,7 +99,7 @@ backend:
# Extra volume mounts to manage our local custom CA and avoid to set ssl_verify: false
extraVolumeMounts:
- name: certs
mountPath: /usr/local/lib/python3.12/site-packages/certifi/cacert.pem
mountPath: /usr/local/lib/python3.13/site-packages/certifi/cacert.pem
subPath: cacert.pem
# Extra volumes to manage our local custom CA and avoid to set ssl_verify: false
@@ -51,6 +51,7 @@ backend:
LIVEKIT_API_URL: https://livekit.127.0.0.1.nip.io/
LIVEKIT_FORCE_WSS_PROTOCOL: True
LIVEKIT_ENABLE_FIREFOX_PROXY_WORKAROUND: True
LIVEKIT_WEBHOOK_EVENTS_FILTER_REGEX: "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
ALLOW_UNREGISTERED_ROOMS: False
FRONTEND_SILENCE_LIVEKIT_DEBUG: False
FRONTEND_SUPPORT: "{'id': '58ea6697-8eba-4492-bc59-ad6562585041', 'help_article_transcript': 'https://lasuite.crisp.help/fr/article/visio-transcript-1sjq43x', 'help_article_recording': 'https://lasuite.crisp.help/fr/article/visio-enregistrement-wgc8o0', 'help_article_more_tools': 'https://lasuite.crisp.help/fr/article/visio-tools-bvxj23'}"
@@ -71,6 +71,7 @@ backend:
{{- end }}
{{- end }}
LIVEKIT_API_URL: https://livekit.127.0.0.1.nip.io/
LIVEKIT_WEBHOOK_EVENTS_FILTER_REGEX: "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
ALLOW_UNREGISTERED_ROOMS: False
FRONTEND_SILENCE_LIVEKIT_DEBUG: False
FRONTEND_SUPPORT: "{'id': '58ea6697-8eba-4492-bc59-ad6562585041'}"