mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2024-12-27 00:29:32 -05:00
23 lines
778 B
Dart
23 lines
778 B
Dart
import 'package:veilid/veilid.dart';
|
|
|
|
Future<VeilidConfig> getVeilidChatConfig() async {
|
|
var config = await getDefaultVeilidConfig('VeilidChat');
|
|
// ignore: do_not_use_environment
|
|
if (const String.fromEnvironment('DELETE_TABLE_STORE') == '1') {
|
|
config =
|
|
config.copyWith(tableStore: config.tableStore.copyWith(delete: true));
|
|
}
|
|
// ignore: do_not_use_environment
|
|
if (const String.fromEnvironment('DELETE_PROTECTED_STORE') == '1') {
|
|
config = config.copyWith(
|
|
protectedStore: config.protectedStore.copyWith(delete: true));
|
|
}
|
|
// ignore: do_not_use_environment
|
|
if (const String.fromEnvironment('DELETE_BLOCK_STORE') == '1') {
|
|
config =
|
|
config.copyWith(blockStore: config.blockStore.copyWith(delete: true));
|
|
}
|
|
|
|
return config;
|
|
}
|