Skip to content

Commit

Permalink
use set instead of map
Browse files Browse the repository at this point in the history
  • Loading branch information
dholms committed Jan 24, 2024
1 parent 98195e5 commit 0f844b6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/pds/src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export type AppContextOptions = {
crawlers: Crawlers
appViewAgent: AtpAgent
alternateAppviewAgent?: AtpAgent
alternateAppviewUsers: Map<string, boolean>
alternateAppviewUsers: Set<string>
moderationAgent: AtpAgent
entrywayAgent?: AtpAgent
authVerifier: AuthVerifier
Expand All @@ -71,7 +71,7 @@ export class AppContext {
public crawlers: Crawlers
private appViewAgent: AtpAgent
private alternateAppviewAgent?: AtpAgent
public alternateAppviewUsers: Map<string, boolean>
public alternateAppviewUsers: Set<string>
public moderationAgent: AtpAgent
public entrywayAgent: AtpAgent | undefined
public authVerifier: AuthVerifier
Expand Down Expand Up @@ -175,8 +175,8 @@ export class AppContext {
const alternateAppviewUsers = (
cfg.bskyAppView.alternate?.users ?? []
).reduce((acc, cur) => {
return acc.set(cur, true)
}, new Map<string, boolean>())
return acc.add(cur)
}, new Set<string>())

const moderationAgent = new AtpAgent({ service: cfg.modService.url })

Expand Down

0 comments on commit 0f844b6

Please sign in to comment.