diff --git a/BTCPayServer/Controllers/UIServerController.cs b/BTCPayServer/Controllers/UIServerController.cs index 80e55bb47..3714e7678 100644 --- a/BTCPayServer/Controllers/UIServerController.cs +++ b/BTCPayServer/Controllers/UIServerController.cs @@ -1049,11 +1049,22 @@ namespace BTCPayServer.Controllers vm.LogoFileId = theme.LogoFileId; vm.CustomThemeFileId = theme.CustomThemeFileId; - if (server.ServerName != vm.ServerName || server.ContactUrl != vm.ContactUrl) + if (server.ServerName != vm.ServerName) { server.ServerName = vm.ServerName; - server.ContactUrl = vm.ContactUrl; settingsChanged = true; + } + + if (server.ContactUrl != vm.ContactUrl) + { + server.ContactUrl = !string.IsNullOrWhiteSpace(vm.ContactUrl) + ? vm.ContactUrl.IsValidEmail() ? $"mailto:{vm.ContactUrl}" : vm.ContactUrl + : null; + settingsChanged = true; + } + + if (settingsChanged) + { await _SettingsRepository.UpdateSetting(server); } diff --git a/BTCPayServer/Controllers/UIStoresController.cs b/BTCPayServer/Controllers/UIStoresController.cs index cf57413f3..b1b986ec6 100644 --- a/BTCPayServer/Controllers/UIStoresController.cs +++ b/BTCPayServer/Controllers/UIStoresController.cs @@ -548,7 +548,7 @@ namespace BTCPayServer.Controllers blob.CustomLogo = model.CustomLogo; blob.CustomCSS = model.CustomCSS; blob.HtmlTitle = string.IsNullOrWhiteSpace(model.HtmlTitle) ? null : model.HtmlTitle; - blob.StoreSupportUrl = string.IsNullOrWhiteSpace(model.SupportUrl) ? null : model.SupportUrl; + blob.StoreSupportUrl = string.IsNullOrWhiteSpace(model.SupportUrl) ? null : model.SupportUrl.IsValidEmail() ? $"mailto:{model.SupportUrl}" : model.SupportUrl; blob.DisplayExpirationTimer = TimeSpan.FromMinutes(model.DisplayExpirationTimer); blob.AutoDetectLanguage = model.AutoDetectLanguage; blob.DefaultLang = model.DefaultLang; diff --git a/BTCPayServer/Views/UIServer/Branding.cshtml b/BTCPayServer/Views/UIServer/Branding.cshtml index 78d63f7e1..c0387f4c4 100644 --- a/BTCPayServer/Views/UIServer/Branding.cshtml +++ b/BTCPayServer/Views/UIServer/Branding.cshtml @@ -28,9 +28,8 @@
- Contact link for support requests related to this BTCPay Server instance. - This link will appear on public facing pages. - Can be any valid URI, such as a website, email, and Nostr. + Add an email address or an external URL where users can contact you for support requests + through a "Contact Us" button, displayed at the bottom of the public facing pages.