private static function addNotification($id, Notification $notification)
{
self::saveNotificationAcrossUiRequestsIfNeeded($id, $notification);
// we store all kinda notifications here so in case the session is not enabled or disabled later there is still
// a chance it gets delivered to the UI during the same request.
self::$notifications[$id] = $notification;
}