mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-12 13:38:31 +09:00
18 lines
480 B
TypeScript
18 lines
480 B
TypeScript
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
import {Config} from '../Config';
|
|
|
|
let cachedCollectDateOfBirth: boolean | null = null;
|
|
|
|
export function getDefaultDateOfBirthCollection(): boolean {
|
|
return !Config.instance.selfHosted;
|
|
}
|
|
|
|
export function instanceCollectsDateOfBirth(): boolean {
|
|
return cachedCollectDateOfBirth ?? getDefaultDateOfBirthCollection();
|
|
}
|
|
|
|
export function setCachedDateOfBirthCollection(collect: boolean): void {
|
|
cachedCollectDateOfBirth = collect;
|
|
}
|