Fix parsing m.relates_to from non-standard events in push rules

This commit is contained in:
Tulir Asokan 2022-09-27 12:39:02 +03:00
commit 53a8608c8a

View file

@ -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 == "" {