From d4239d520ac7cace132d5657f080b38c6a540090 Mon Sep 17 00:00:00 2001 From: Adam Van Ymeren Date: Thu, 3 Jul 2025 21:42:33 -0700 Subject: [PATCH] backfill: fix forward backfill only skip too new messages if we're actually doing backwards backfill --- pkg/connector/backfill.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/connector/backfill.go b/pkg/connector/backfill.go index 6ad12db7..7d1ad240 100644 --- a/pkg/connector/backfill.go +++ b/pkg/connector/backfill.go @@ -282,7 +282,7 @@ func (t *TelegramClient) FetchMessages(ctx context.Context, fetchParams bridgev2 // message, don't convert any more messages. log.Debug().Msg("stopping at anchor message") break - } else if msg.GetID() >= stopAt { + } else if !fetchParams.Forward && msg.GetID() >= stopAt { // If we are doing backwards backfill and we get a message more // recent than the anchor message, skip it. log.Debug().Msg("skipping message past anchor message")