diff --git a/config.sample.json b/config.sample.json index 27ad9f73..3bdace02 100644 --- a/config.sample.json +++ b/config.sample.json @@ -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 -} +} \ No newline at end of file diff --git a/lib/config/app_config.dart b/lib/config/app_config.dart index 1de9507a..523f2f87 100644 --- a/lib/config/app_config.dart +++ b/lib/config/app_config.dart @@ -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'];