Cleanup, add mod
This commit is contained in:
@@ -34,7 +34,7 @@ async function getGeolocation(): Promise<Device['geolocation']> {
|
||||
throw new Error(`geolocation: lookup failed ${res.status}`)
|
||||
}
|
||||
|
||||
const json = {country_code: 'US'} // await res.json()
|
||||
const json = {country_code: 'BR'} // await res.json()
|
||||
|
||||
if (json.country_code) {
|
||||
return {
|
||||
@@ -112,11 +112,11 @@ export async function ensureGeolocationResolved() {
|
||||
|
||||
const cached = device.get(['geolocation'])
|
||||
if (cached) {
|
||||
logger.info(`geolocation: using cache`, {cached})
|
||||
logger.debug(`geolocation: using cache`, {cached})
|
||||
} else {
|
||||
logger.info(`geolocation: no cache`)
|
||||
logger.debug(`geolocation: no cache`)
|
||||
await geolocationResolution
|
||||
logger.info(`geolocation: resolved`, {
|
||||
logger.debug(`geolocation: resolved`, {
|
||||
resolved: device.get(['geolocation']),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,16 +3,16 @@ import {BskyAgent} from '@atproto/api'
|
||||
import {logger} from '#/logger'
|
||||
import {device} from '#/storage'
|
||||
|
||||
export const ADDITIONAL_LABELER = 'did:plc:oz5zavafp7szpd2yyko57ccz'
|
||||
export const BR_LABELER = 'did:plc:ekitcvx7uwnauoqy5oest3hm'
|
||||
export const ADDITIONAL_LABELERS_MAP: {
|
||||
[countryCode: string]: string[]
|
||||
} = {
|
||||
US: [ADDITIONAL_LABELER],
|
||||
BR: [BR_LABELER],
|
||||
}
|
||||
export const ALL_ADDITIONAL_LABELERS = Object.values(
|
||||
ADDITIONAL_LABELERS_MAP,
|
||||
).flat()
|
||||
export const NON_CONFIGURABLE_LABELERS = [ADDITIONAL_LABELER]
|
||||
export const NON_CONFIGURABLE_LABELERS = [BR_LABELER]
|
||||
|
||||
export function isNonConfigurableModerationAuthority(did: string) {
|
||||
return NON_CONFIGURABLE_LABELERS.includes(did)
|
||||
@@ -32,7 +32,7 @@ export function configureAdditionalModerationAuthorities() {
|
||||
new Set([...BskyAgent.appLabelers, ...additionalLabelers]),
|
||||
)
|
||||
|
||||
logger.debug(`applying mod authorities`, {
|
||||
logger.info(`applying mod authorities`, {
|
||||
additionalLabelers,
|
||||
appLabelers,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user