feat: disable AI summary/transcription when room recording is off
- Unchecking "allow recording" in room settings now also clears the transcript/AI summary checkbox (it was only greyed out before, so a previously enabled value stayed checked and got saved) - Server enforces the coupling on room create and update: with recording disabled, recording_transcript is always stored as 0 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -244,7 +244,8 @@ router.post('/', authenticateToken, async (req, res) => {
|
||||
record_meeting !== false ? 1 : 0,
|
||||
guest_access ? 1 : 0,
|
||||
moderator_code || null,
|
||||
recording_transcript ? 1 : 0,
|
||||
// Transcription/AI summary requires recording to be enabled
|
||||
(record_meeting !== false && recording_transcript) ? 1 : 0,
|
||||
]);
|
||||
|
||||
const room = await db.get('SELECT * FROM rooms WHERE id = ?', [result.lastInsertRowid]);
|
||||
@@ -306,6 +307,9 @@ router.put('/:uid', authenticateToken, async (req, res) => {
|
||||
}
|
||||
}
|
||||
|
||||
// Transcription/AI summary requires recording — force it off when recording ends up disabled
|
||||
const effectiveRecordMeeting = record_meeting !== undefined ? !!record_meeting : !!room.record_meeting;
|
||||
|
||||
await db.run(`
|
||||
UPDATE rooms SET
|
||||
name = COALESCE(?, name),
|
||||
@@ -338,7 +342,7 @@ router.put('/:uid', authenticateToken, async (req, res) => {
|
||||
moderator_code !== undefined ? (moderator_code || null) : room.moderator_code,
|
||||
learning_analytics !== undefined ? (learning_analytics ? 1 : 0) : null,
|
||||
analytics_visibility && ['owner', 'shared'].includes(analytics_visibility) ? analytics_visibility : null,
|
||||
recording_transcript !== undefined ? (recording_transcript ? 1 : 0) : null,
|
||||
!effectiveRecordMeeting ? 0 : (recording_transcript !== undefined ? (recording_transcript ? 1 : 0) : null),
|
||||
req.params.uid,
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user