From a94f4ce77e7af64a77b144c8a9be0bf514d2f53b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=E2=96=88=E2=96=88=E2=96=88=E2=96=88=E2=96=88?= Date: Wed, 1 Oct 2025 12:13:20 -0400 Subject: [PATCH] bug: twitch login oauth --- .../twitch-bot-config.component.ts | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/src/app/view/twitch/twitch-bot-config/twitch-bot-config.component.ts b/src/src/app/view/twitch/twitch-bot-config/twitch-bot-config.component.ts index d1b4074..fbca281 100644 --- a/src/src/app/view/twitch/twitch-bot-config/twitch-bot-config.component.ts +++ b/src/src/app/view/twitch/twitch-bot-config/twitch-bot-config.component.ts @@ -86,6 +86,27 @@ export class TwitchBotConfigComponent implements OnInit, OnDestroy { this.auth.validateToken(oauth.AccessToken).subscribe({ next: _ => { this.auth.setToken(oauth); + + // Check if the bot account is modded. If it isn't, we can offer to mod it. + this.twitchBotApi.getIsMod().subscribe({ + next: response => { + this.botIsMod = response.isMod; + }, + error: err => { + this.botIsMod = false; + this.error = 'Unable to determine if nullinside is a mod in your channel'; + console.log(err); + } + }); + + // Get the person's existing configuration. + this.twitchBotApi.getConfig().subscribe({ + next: response => { + this.botEnabled = response.isEnabled; + this.banKnownBots = response.banKnownBots; + }, + error: err => console.error(err) + }); }, error: (_: HttpErrorResponse) => { this.onLoginFailed(); @@ -97,27 +118,6 @@ export class TwitchBotConfigComponent implements OnInit, OnDestroy { // make this unnecessary. const url = this.router.createUrlTree([], {relativeTo: this.route}).toString(); this.location.go(url); - - // Check if the bot account is modded. If it isn't, we can offer to mod it. - this.twitchBotApi.getIsMod().subscribe({ - next: response => { - this.botIsMod = response.isMod; - }, - error: err => { - this.botIsMod = false; - this.error = 'Unable to determine if nullinside is a mod in your channel'; - console.log(err); - } - }); - - // Get the person's existing configuration. - this.twitchBotApi.getConfig().subscribe({ - next: response => { - this.botEnabled = response.isEnabled; - this.banKnownBots = response.banKnownBots; - }, - error: err => console.error(err) - }); }, error: (_: HttpErrorResponse) => { this.onLoginFailed();