load shared chat state

This commit is contained in:
2026-10-25 05:06:24 +01:00
parent ba84f9d778
commit 85cd8aee00
+4
View File
@@ -56,6 +56,7 @@
let collaborationError = '';
let showCollaboration = false;
let collaborationGuestId = '';
let sharedChatSession: { session_id: string; host_broadcaster_id: string; participants: Array<{ broadcaster_id: string }> } | null = null;
let oauthLink = '';
let oauthIdentity: 'streamer' | 'bot' = 'streamer';
let oauthBusy = false;
@@ -251,8 +252,11 @@
const invites = await fetch(`${serverAddress}/api/v1/twitch/collaboration/invites?session_id=${encodeURIComponent(collaborationSession.id)}`, { headers: { authorization: `Bearer ${sessionToken}` } });
if (invites.ok) collaborationInvites = await invites.json();
}
const sharedChat = await fetch(`${serverAddress}/api/v1/twitch/collaboration/shared-chat`, { headers: { authorization: `Bearer ${sessionToken}` } });
if (sharedChat.ok) sharedChatSession = await sharedChat.json();
} catch {
collaborationSession = null;
sharedChatSession = null;
}
}