notifications: clear email status when message is empty
This commit is contained in:
@@ -192,8 +192,12 @@ async function runSystemChecks() {
|
||||
}
|
||||
|
||||
async function checkMailStatus() {
|
||||
const message = await mail.checkConfiguration();
|
||||
await notifications.alert(notifications.ALERT_MAIL_STATUS, 'Email is not configured properly', message, { persist: true });
|
||||
const result = await mail.checkConfiguration();
|
||||
if (result.status) {
|
||||
await notifications.clearAlert(notifications.ALERT_REBOOT, 'Email is not configured properly');
|
||||
} else {
|
||||
await notifications.alert(notifications.ALERT_MAIL_STATUS, 'Email is not configured properly', result.message, { persist: true });
|
||||
}
|
||||
}
|
||||
|
||||
async function checkRebootRequired() {
|
||||
|
||||
Reference in New Issue
Block a user