Fix Discord Webhook not working unless webhook_color has a value in the config ()

* Set default properly

If this slight hack is not done, Akashi may load an empty color code, causing Discord to reject the Webhook due to an empty value.
This commit is contained in:
Salanto 2022-05-17 20:28:07 +02:00 committed by GitHub
parent f363a7d876
commit 488c9d8754
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -473,7 +473,14 @@ QString ConfigManager::discordUptimeWebhookUrl()
QString ConfigManager::discordWebhookColor()
{
return m_discord->value("Discord/webhook_color","13312842").toString();
const QString l_default_color = "13312842";
QString l_color = m_discord->value("Discord/webhook_color", l_default_color).toString();
if (l_color.isEmpty()) {
return l_default_color;
}
else {
return l_color;
}
}
bool ConfigManager::passwordRequirements()