Add first pass at IndieAuth modal. For #1863

This commit is contained in:
Gabe Kangas
2022-08-20 16:13:31 -07:00
parent c41e0ab90a
commit c4479a0ffc
11 changed files with 258 additions and 15 deletions

View File

@@ -6,11 +6,13 @@ export default function handleConnectedClientInfoMessage(
setChatDisplayColor: (number) => void,
setChatUserId: (number) => void,
setIsChatModerator: (boolean) => void,
setChatAuthenticated: (boolean) => void,
) {
const { user } = message;
const { id, displayName, displayColor, scopes } = user;
const { id, displayName, displayColor, scopes, authenticated } = user;
setChatDisplayName(displayName);
setChatDisplayColor(displayColor);
setChatUserId(id);
setIsChatModerator(scopes?.includes('moderator'));
setChatAuthenticated(authenticated);
}