load shared chat state
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user