From 53a8608c8a205a6b714aee2e733079019a424d30 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Tue, 27 Sep 2022 12:39:02 +0300 Subject: [PATCH] Fix parsing m.relates_to from non-standard events in push rules --- pushrules/condition.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pushrules/condition.go b/pushrules/condition.go index 00a27f5b..8e69c0d9 100644 --- a/pushrules/condition.go +++ b/pushrules/condition.go @@ -195,7 +195,7 @@ func (cond *PushCondition) matchRelatedEvent(room Room, evt *event.Event) bool { } else { res := gjson.GetBytes(evt.Content.VeryRaw, `m\.relates_to`) if res.Exists() && res.IsObject() { - _ = json.Unmarshal([]byte(res.Str), &relatesTo) + _ = json.Unmarshal([]byte(res.Raw), &relatesTo) } } if evtID := cond.getRelationEventID(relatesTo); evtID == "" {