Skip to content

Commit

Permalink
fix: check scopes again, i think that other bug is fixed where scopes…
Browse files Browse the repository at this point in the history
… kept getting reset
  • Loading branch information
Geczy committed Oct 6, 2024
1 parent 5350aea commit 66074ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/dota/src/db/watcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ class SetupSupabase {
const ONE_DAY_IN_MS = 86_400_000 // 1 day in ms
const dayAgo = new Date(Date.now() - ONE_DAY_IN_MS).toISOString()

// const hasNewestScopes = client.Account?.scope?.includes('channel:bot')
const hasNewestScopes = client.Account?.scope?.includes('channel:bot')
const requiresRefresh = client.Account?.requires_refresh
if (requiresRefresh && !didTellUser.has(client.name)) {
if ((!hasNewestScopes || requiresRefresh) && !didTellUser.has(client.name)) {
didTellUser.add(client.name)

const { data, error } = await supabase
Expand Down

0 comments on commit 66074ba

Please sign in to comment.