chore: Make webBaseUrl configurable in config.json

This commit is contained in:
Christian Pauly 2021-06-18 15:38:01 +02:00
parent 826d8778dd
commit 92e4b50955
2 changed files with 8 additions and 3 deletions

View File

@ -3,8 +3,9 @@
"application_welcome_message": null,
"default_homeserver": "matrix.org",
"jitsi_instance": "https://meet.jit.si/",
"web_base_url": "https://fluffychat.im/web",
"privacy_url": "https://fluffychat.im/en/privacy.html",
"render_html": false,
"hide_redacted_events": false,
"hide_unknown_events": false
}
}

View File

@ -18,7 +18,8 @@ abstract class AppConfig {
static String get privacyUrl => _privacyUrl;
static const String appId = 'im.fluffychat.FluffyChat';
static const String appOpenUrlScheme = 'im.fluffychat';
static const String webBaseUrl = 'https://fluffychat.im/web';
static String _webBaseUrl = 'https://fluffychat.im/web';
static String get webBaseUrl => _webBaseUrl;
static const String sourceCodeUrl = 'https://gitlab.com/famedly/fluffychat';
static const String supportUrl =
'https://gitlab.com/famedly/fluffychat/issues';
@ -60,7 +61,10 @@ abstract class AppConfig {
jitsiInstance = json['jitsi_instance'];
}
if (json['privacy_url'] is String) {
_privacyUrl = json['privacy_url'];
_webBaseUrl = json['privacy_url'];
}
if (json['web_base_url'] is String) {
_privacyUrl = json['web_base_url'];
}
if (json['render_html'] is bool) {
renderHtml = json['render_html'];