Fix that no_more_notifications gets reset when Recovery notifications are filtered away

Hello from the OSMC hackathon :)
This commit is contained in:
Michael Friedrich 2018-11-08 12:13:32 +01:00
parent ec169de5c4
commit d082e8c1b1
1 changed files with 10 additions and 0 deletions

View File

@ -317,6 +317,16 @@ void Notification::BeginExecuteNotification(NotificationType type, const CheckRe
<< "Not sending " << (reminder ? "reminder " : " ") << "notifications for notification object '" << GetName() << "': type '"
<< NotificationTypeToStringInternal(type) << "' does not match type filter: "
<< NotificationFilterToString(GetTypeFilter(), GetTypeFilterMap()) << ".";
/* Ensure to reset no_more_notifications on Recovery notifications,
* even if the admin did not configure them in the filter.
*/
{
ObjectLock olock(this);
if (type == NotificationRecovery && GetInterval() <= 0)
SetNoMoreNotifications(false);
}
return;
}