From 226144ca9f8507bd9f3e3779cd70eb784a44fbf7 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sat, 12 Oct 2024 18:14:22 +0300 Subject: [PATCH] hicli/sync: fix handling redactions to unknown events --- hicli/sync.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hicli/sync.go b/hicli/sync.go index d66c35bd..209e4997 100644 --- a/hicli/sync.go +++ b/hicli/sync.go @@ -404,6 +404,9 @@ func (h *HiClient) processStateAndTimeline(ctx context.Context, room *database.R if err != nil { return fmt.Errorf("failed to get redaction target: %w", err) } + if dbEvt == nil { + return nil + } if dbEvt.RelationType == event.RelReplace || dbEvt.RelationType == event.RelAnnotation { _, err = addOldEvent(0, dbEvt.RelatesTo) if err != nil {