mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-22 05:09:05 +00:00
fix: populate room_name in transcript GET endpoint (#783)
Fixes monadical/internalai#14
This commit is contained in:
@@ -17,6 +17,7 @@ from pydantic import (
|
||||
import reflector.auth as auth
|
||||
from reflector.db import get_database
|
||||
from reflector.db.recordings import recordings_controller
|
||||
from reflector.db.rooms import rooms_controller
|
||||
from reflector.db.search import (
|
||||
DEFAULT_SEARCH_LIMIT,
|
||||
SearchLimit,
|
||||
@@ -473,6 +474,11 @@ async def transcript_get(
|
||||
|
||||
is_multitrack = await _get_is_multitrack(transcript)
|
||||
|
||||
room_name = None
|
||||
if transcript.room_id:
|
||||
room = await rooms_controller.get_by_id(transcript.room_id)
|
||||
room_name = room.name if room else None
|
||||
|
||||
participants = []
|
||||
if transcript.participants:
|
||||
user_ids = [p.user_id for p in transcript.participants if p.user_id is not None]
|
||||
@@ -503,6 +509,7 @@ async def transcript_get(
|
||||
"meeting_id": transcript.meeting_id,
|
||||
"source_kind": transcript.source_kind,
|
||||
"room_id": transcript.room_id,
|
||||
"room_name": room_name,
|
||||
"audio_deleted": transcript.audio_deleted,
|
||||
"participants": participants,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user