From 8a852ba054e7b74b38ffc884182d5671991f271b Mon Sep 17 00:00:00 2001 From: webzwo0i Date: Sun, 27 Nov 2022 16:21:07 +0100 Subject: [PATCH] Don't omit `pattern` key if empty. This is needed to match state events with an empty value. Fixes #2882 --- internal/pushrules/condition.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/pushrules/condition.go b/internal/pushrules/condition.go index 2d9773c0f..dd93cbc6e 100644 --- a/internal/pushrules/condition.go +++ b/internal/pushrules/condition.go @@ -14,7 +14,7 @@ type Condition struct { // Pattern indicates the value pattern that must match. Required // for EventMatchCondition. - Pattern string `json:"pattern,omitempty"` + Pattern string `json:"pattern"` // Is indicates the condition that must be fulfilled. Required for // RoomMemberCountCondition.