Fix Discord Webhook not working unless webhook_color has a value in the config (#262)
* 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:
parent
f363a7d876
commit
488c9d8754
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user