mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 21:15:32 +09:00
fix(guild): treat very high as high without phone verification (#3095)
This commit is contained in:
1 parent
d691047884
commit
2df82b2b5e
28 files changed
+289
-18
No files matched your search
@@ -286,6 +286,7 @@ export interface MasterConfig {
|
||||
};
|
||||
instance: {
|
||||
self_hosted: boolean;
|
||||
phone_verification_enabled?: boolean;
|
||||
auto_join_invite_code?: string;
|
||||
visionaries_guild_id?: string;
|
||||
visionaries_guild_visionary_role_id?: string;
|
||||
|
||||
@@ -290,6 +290,15 @@ describe('buildNamedFluxerEnvOverrides', () => {
|
||||
});
|
||||
});
|
||||
|
||||
test('maps the phone verification switch onto instance.phone_verification_enabled', () => {
|
||||
expect(buildNamedFluxerEnvOverrides({FLUXER_PHONE_VERIFICATION_ENABLED: 'true'})).toEqual({
|
||||
instance: {phone_verification_enabled: true},
|
||||
});
|
||||
expect(buildNamedFluxerEnvOverrides({FLUXER_PHONE_VERIFICATION_ENABLED: 'false'})).toEqual({
|
||||
instance: {phone_verification_enabled: false},
|
||||
});
|
||||
});
|
||||
|
||||
test('rejects a store enabled flag that is not a boolean', () => {
|
||||
expect(() => buildNamedFluxerEnvOverrides({FLUXER_APP_STORE_ENABLED: 'yes'})).toThrow(
|
||||
'FLUXER_APP_STORE_ENABLED must be true or false',
|
||||
|
||||
@@ -265,6 +265,7 @@ const NAMED_FLUXER_ENV_OVERRIDES: Record<string, NamedEnvOverride> = {
|
||||
parse: parseBoolean,
|
||||
},
|
||||
FLUXER_SELF_HOSTED: {path: ['instance', 'self_hosted'], parse: parseBoolean},
|
||||
FLUXER_PHONE_VERIFICATION_ENABLED: {path: ['instance', 'phone_verification_enabled'], parse: parseBoolean},
|
||||
FLUXER_AUTO_JOIN_INVITE_CODE: {path: ['instance', 'auto_join_invite_code']},
|
||||
FLUXER_VISIONARIES_GUILD_ID: {path: ['instance', 'visionaries_guild_id']},
|
||||
FLUXER_VISIONARIES_GUILD_VISIONARY_ROLE_ID: {path: ['instance', 'visionaries_guild_visionary_role_id']},
|
||||
|
||||
Reference in new issue
Block a user