fix: Support new ETag format in notification states

This commit is contained in:
Joachim Van Herwegen
2023-04-24 14:38:27 +02:00
parent 4ff6fe66ea
commit b250beaec9
5 changed files with 46 additions and 62 deletions

View File

@@ -1,3 +1,4 @@
import { sameResourceState } from '../../storage/Conditions';
import type { NotificationGenerator } from './generate/NotificationGenerator';
import type { NotificationEmitter } from './NotificationEmitter';
import type { NotificationHandlerInput } from './NotificationHandler';
@@ -37,7 +38,7 @@ export class ComposedNotificationHandler extends NotificationHandler {
const { state } = input.channel;
// In case the state matches there is no need to send the notification
if (typeof state === 'string' && state === notification.state) {
if (typeof state === 'string' && notification.state && sameResourceState(state, notification.state)) {
return;
}