Add guest Live Show opt-in toggle
This commit is contained in:
@@ -67,6 +67,9 @@ export interface EventData {
|
||||
};
|
||||
branding?: EventBrandingPayload | null;
|
||||
guest_upload_visibility?: 'immediate' | 'review';
|
||||
live_show?: {
|
||||
moderation_mode?: 'off' | 'manual' | 'trusted_only';
|
||||
};
|
||||
}
|
||||
|
||||
export interface PackageData {
|
||||
@@ -262,6 +265,7 @@ export async function fetchEvent(eventKey: string): Promise<EventData> {
|
||||
|
||||
const json = await res.json();
|
||||
|
||||
const moderationMode = json?.live_show?.moderation_mode;
|
||||
const normalized: EventData = {
|
||||
...json,
|
||||
name: coerceLocalized(json?.name, 'Fotospiel Event'),
|
||||
@@ -271,6 +275,11 @@ export async function fetchEvent(eventKey: string): Promise<EventData> {
|
||||
engagement_mode: (json?.engagement_mode as 'tasks' | 'photo_only' | undefined) ?? 'tasks',
|
||||
guest_upload_visibility:
|
||||
json?.guest_upload_visibility === 'immediate' ? 'immediate' : 'review',
|
||||
live_show: {
|
||||
moderation_mode: moderationMode === 'off' || moderationMode === 'manual' || moderationMode === 'trusted_only'
|
||||
? moderationMode
|
||||
: 'manual',
|
||||
},
|
||||
demo_read_only: Boolean(json?.demo_read_only),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user