mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 05:54:26 +01:00
Specify mailto: prefix for emails in Server Settings (#5844)
* Specify mailto: prefix for emails in Server Settings * resolve test failure * Update wording * Apply mailto-prefix on setting change --------- Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
This commit is contained in:
committed by
GitHub
parent
966547db54
commit
fca3480e37
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user