From 0ea4b348fe2bde9db220576b07ff117f4556939b Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Wed, 14 Aug 2024 21:28:11 +0300 Subject: [PATCH] bridgev2/backfill: add missing check to thread backfill --- bridgev2/portalbackfill.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridgev2/portalbackfill.go b/bridgev2/portalbackfill.go index af71faa6..b814b1f3 100644 --- a/bridgev2/portalbackfill.go +++ b/bridgev2/portalbackfill.go @@ -365,7 +365,7 @@ func (portal *Portal) compileBatchMessage(ctx context.Context, source *UserLogin out.DBReactions = append(out.DBReactions, dbReaction) out.Extras = append(out.Extras, &MatrixSendExtra{ReactionMeta: dbReaction}) } - if firstPart != nil && !inThread && portal.Bridge.Config.Backfill.Threads.MaxInitialMessages > 0 { + if firstPart != nil && !inThread && portal.Bridge.Config.Backfill.Threads.MaxInitialMessages > 0 && msg.ShouldBackfillThread { portal.fetchThreadInsideBatch(ctx, source, firstPart, out) } }