Skip to content

Commit

Permalink
add trending topics to server cfg (#3226)
Browse files Browse the repository at this point in the history
* add trending topics to server cfg

* rename stuff

* remove langs
  • Loading branch information
haileyok authored Dec 16, 2024
1 parent bb77203 commit 3b83cce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/bsky/src/api/app/bsky/unspecced/getConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export default function (server: Server, ctx: AppContext) {
encoding: 'application/json',
body: {
checkEmailConfirmed: ctx.cfg.clientCheckEmailConfirmed,
topicsEnabled: ctx.cfg.topicsEnabled,
},
}
},
Expand Down
7 changes: 7 additions & 0 deletions packages/bsky/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export interface ServerConfigValues {
maxThreadDepth?: number
// client config
clientCheckEmailConfirmed?: boolean
topicsEnabled?: boolean
}

export class ServerConfig {
Expand Down Expand Up @@ -134,6 +135,7 @@ export class ServerConfig {
: process.env.BSKY_STATSIG_ENV || 'development'
const clientCheckEmailConfirmed =
process.env.BSKY_CLIENT_CHECK_EMAIL_CONFIRMED === 'true'
const topicsEnabled = process.env.BSKY_TOPICS_ENABLED === 'true'
const indexedAtEpoch = process.env.BSKY_INDEXED_AT_EPOCH
? new Date(process.env.BSKY_INDEXED_AT_EPOCH)
: undefined
Expand Down Expand Up @@ -186,6 +188,7 @@ export class ServerConfig {
statsigKey,
statsigEnv,
clientCheckEmailConfirmed,
topicsEnabled,
indexedAtEpoch,
bigThreadUris,
bigThreadDepth,
Expand Down Expand Up @@ -355,6 +358,10 @@ export class ServerConfig {
return this.cfg.clientCheckEmailConfirmed
}

get topicsEnabled() {
return this.cfg.topicsEnabled
}

get indexedAtEpoch() {
return this.cfg.indexedAtEpoch
}
Expand Down

0 comments on commit 3b83cce

Please sign in to comment.