Add guest Live Show opt-in toggle

This commit is contained in:
Codex Agent
2026-01-05 15:29:59 +01:00
parent 15be3b847c
commit 35ef8f1586
8 changed files with 116 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ export type QueueItem = {
blob: Blob;
emotion_id?: number | null;
task_id?: number | null;
live_show_opt_in?: boolean | null;
status: 'pending' | 'uploading' | 'done' | 'error';
retries: number;
nextAttemptAt?: number | null;

View File

@@ -14,6 +14,9 @@ export async function createUpload(
form.append('photo', it.blob, it.fileName);
if (it.emotion_id) form.append('emotion_id', String(it.emotion_id));
if (it.task_id) form.append('task_id', String(it.task_id));
if (typeof it.live_show_opt_in === 'boolean') {
form.append('live_show_opt_in', it.live_show_opt_in ? '1' : '0');
}
xhr.upload.onprogress = (ev) => {
if (onProgress && ev.lengthComputable) {
const pct = Math.min(100, Math.round((ev.loaded / ev.total) * 100));