fix(auth): request moderator OAuth scopes only on opt-in

Stop asking for mod scopes at normal login so existing core-only tokens
never hit a missing-permissions dialog. Gate moderated-channels Helix,
offer an Enable flow for mods/broadcasters, and upgrade atomically.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Tommy Chow 2026-08-09 15:33:06 -07:00
parent 2d65aeec29
commit cc772a7c90
15 changed files with 690 additions and 128 deletions

View file

@ -684,5 +684,18 @@ void main() {
final updated = original.fromIRCMessage(ircMsg);
expect(updated.mod, isFalse);
});
test('missing mod and subscriber tags are false', () {
const original = USERSTATE();
final ircMsg = IRCMessage(
raw: '',
command: Command.userState,
tags: {'display-name': 'TestUser'},
);
final updated = original.fromIRCMessage(ircMsg);
expect(updated.mod, isFalse);
expect(updated.subscriber, isFalse);
});
});
}